cooking comepete
This commit is contained in:
parent
c68d013bc1
commit
f1799183f3
4 changed files with 17 additions and 7 deletions
13
Tools.gd
13
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue