#How to create custom checks in SlashCommandGroup
1 messages · Page 1 of 1 (latest)
@unkempt galleon , if I'm understanding you correctly, this was the WHOLE purpose of permissions 2.0. You now control this within the integrations tab within discord, not by code.
You just need to be at pycord 2.0rc1
I have admin ids in an database listed. It can not be discord controlled @cursive ermine
I am stuck on making an Command slash check
I understand now. Wouldn't it be easier to make it role based? I'm just not seeing the benefit of adding database query just to see if someone has permission to run a command.
Much easier to code also.
I have an game bot, the admin could be not in the main guild, thats why i am using an database
Someone else more knowledgeable can verify, but I dont think SlashCommandGroup support checks like commands do. But I could be wrong, so I'll defer. . .
Personally, if its only one or two, I wouldn't use a database for that. I'd just have a list with the ID's in place then something like:
interlist = []
append the list here to include your admin ID's
adminAccess = False
for adminCheck in iterList:
if adminCheck == ctx.author.id:
adminAccess = True
if adminAccess == False:
await ctx.respond('You do not have access to this function.')
return
SlashCommandGroup supports checks. There wouldn't be an method that if it wasn't
whats that @summer surge
The checks