Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The command !set_superuser won't work #6

Open
russian-developer opened this issue Jun 23, 2020 · 0 comments
Open

The command !set_superuser won't work #6

russian-developer opened this issue Jun 23, 2020 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers upstream This requires action with dependencies

Comments

@russian-developer
Copy link

@dp.message_handler(commands=["set_superuser"], commands_prefix="!", is_superuser=True)

In the first lines of the function above, you check the user_id is existed by calling get_args method of the message. The check always returns false.
The method message.get_args() returns an argument only if it command that starts with /.

Trace:
message.get_args() -> message.get_full_command() -> message.is_command() -> return self.text and self.text.startswith("/")

@WhiteMemory99 WhiteMemory99 mentioned this issue Jul 7, 2020
@evgfilim1 evgfilim1 added bug Something isn't working good first issue Good for newcomers upstream This requires action with dependencies labels Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers upstream This requires action with dependencies
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants