Answer the question
In order to leave comments, you need to log in
User access to Discord.py?
How to give the user access to the command?
So that both I and that person can use it._ .
Answer the question
In order to leave comments, you need to log in
compare the id of the user who entered the command with the id of the user who has access.
More specific solution, use "checks" (check): https://discordpy.readthedocs.io/en/stable/ext/com...
async def special_command_check(ctx):
return ctx.author.id in [204191975222080878, 544689912660601908]
@commands.check(special_command_check)
@bot.command()
async def scmd(ctx):
await ctx.send("You can run this command!")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question