L
L
LucikGrossman2020-08-16 02:58:58
Python
LucikGrossman, 2020-08-16 02:58:58

User access?

I am writing code so that only I can access the commands, but it gives an error.

The code:

def проверка(ctx): 
    return ctx.message.author.id = = 418786573283491853 

@client.command()
@commands.check(проверка) 
async def only_for_me( ctx ): 
    await ctx.send('Успешно')


Mistake:
File "botik.py", line 29
    return ctx.message.author.id = = 418786573283491853
                                                   ^
SyntaxError: invalid syntax

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Deleting Account, 2020-08-16
@LucikGrossman

return ctx.message.author.id == 418786573283491853 # , а не 
return ctx.message.author.id = = 418786573283491853

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question