cooking comepete

This commit is contained in:
Tabby 2025-11-02 18:41:57 +11:00
parent c68d013bc1
commit f1799183f3
4 changed files with 17 additions and 7 deletions

View file

@ -20,8 +20,8 @@
- [x] seperate place to store bot access key - [x] seperate place to store bot access key
- [x] update test command - [x] update test command
- [ ] provide real technician id - [x] provide real technician id
- [ ] update global commands - [x] update global commands
### Possible furture development ### Possible furture development
- job management - job management

View file

@ -1,17 +1,24 @@
extends Node 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: func check_perms(interaction : DiscordInteraction) -> bool:
print(interaction.member.roles) print(interaction.member.roles)
for role : String in interaction.member.roles: for role : String in interaction.member.roles:
if role == technician_role_id: if role == fabsoc_technician_rid:
return true return true
elif role == fabsoc_exec_rid:
return true
elif role == personal_server_technician_rid:
return true
#havent found the role, sending error #havent found the role, sending error
interaction.reply({ 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 "ephemeral" : true
}) })
return false return false

View file

@ -29,6 +29,8 @@ func load_data():
save_new() save_new()
pass pass
print("Save Location: " + ProjectSettings.globalize_path(save_path))
func save_data(): func save_data():
ResourceSaver.save(save, save_path) ResourceSaver.save(save, save_path)
pass pass

View file

@ -55,10 +55,11 @@ func _on_bot_ready(bot: DiscordBot):
# -----Single server (updates instantly) # -----Single server (updates instantly)
#_register_application_commands(bot, "guild_id_here") #_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) # -----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: #func _on_message_create(bot: DiscordBot, message: Message, channel: Dictionary) -> void: