FabcatBot/Tools.gd

25 lines
700 B
GDScript3
Raw Permalink Normal View History

2025-11-02 13:24:43 +11:00
extends Node
2025-11-02 18:41:57 +11:00
const personal_server_technician_rid : String = "692291233627897876"
const fabsoc_technician_rid : String = "1407246322020515892"
const fabsoc_exec_rid : String = "1038009964997914665"
2025-11-02 13:24:43 +11:00
func check_perms(interaction : DiscordInteraction) -> bool:
print(interaction.member.roles)
for role : String in interaction.member.roles:
2025-11-02 18:41:57 +11:00
if role == fabsoc_technician_rid:
2025-11-02 13:24:43 +11:00
return true
2025-11-02 18:41:57 +11:00
elif role == fabsoc_exec_rid:
return true
elif role == personal_server_technician_rid:
return true
2025-11-02 13:24:43 +11:00
#havent found the role, sending error
interaction.reply({
2025-11-02 18:41:57 +11:00
"content" : "sorry! only users with the `technician` or `exec` role can use this command",
2025-11-02 13:24:43 +11:00
"ephemeral" : true
})
return false