diff --git a/TODO.md b/TODO.md index 4a7b2ff..ff00416 100644 --- a/TODO.md +++ b/TODO.md @@ -20,8 +20,8 @@ - [x] seperate place to store bot access key - [x] update test command -- [ ] provide real technician id -- [ ] update global commands +- [x] provide real technician id +- [x] update global commands ### Possible furture development - job management diff --git a/Tools.gd b/Tools.gd index 877d450..b17b78b 100644 --- a/Tools.gd +++ b/Tools.gd @@ -1,17 +1,24 @@ extends Node -const technician_role_id : String = "692291233627897876" +const personal_server_technician_rid : String = "692291233627897876" +const fabsoc_technician_rid : String = "1407246322020515892" +const fabsoc_exec_rid : String = "1038009964997914665" func check_perms(interaction : DiscordInteraction) -> bool: print(interaction.member.roles) for role : String in interaction.member.roles: - if role == technician_role_id: + if role == fabsoc_technician_rid: return true + elif role == fabsoc_exec_rid: + return true + elif role == personal_server_technician_rid: + return true + #havent found the role, sending error interaction.reply({ - "content" : "sorry! only users with the `technician` role can use this command", + "content" : "sorry! only users with the `technician` or `exec` role can use this command", "ephemeral" : true }) return false diff --git a/library.gd b/library.gd index 25f2215..ddd258a 100644 --- a/library.gd +++ b/library.gd @@ -29,6 +29,8 @@ func load_data(): save_new() pass + print("Save Location: " + ProjectSettings.globalize_path(save_path)) + func save_data(): ResourceSaver.save(save, save_path) pass diff --git a/main.gd b/main.gd index bb22819..ecc09b9 100644 --- a/main.gd +++ b/main.gd @@ -55,10 +55,11 @@ func _on_bot_ready(bot: DiscordBot): # -----Single server (updates instantly) #_register_application_commands(bot, "guild_id_here") - _register_application_commands(bot, "679917161195765822") + #_register_application_commands(bot, "679917161195765822") # personal server + #_register_application_commands(bot, "1038007666032787476") # fabsoc # -----Global (may take upto 1hr to update) - #_register_application_commands(bot) + _register_application_commands(bot) #func _on_message_create(bot: DiscordBot, message: Message, channel: Dictionary) -> void: