aiogram / aiogram/bot

The command `!set_superuser` won't work

Open
#6 0 comments 0 reactions 0 assignees View on GitHub
bug good first issue upstream
Dominant language
Python
Stars
282
Forks
58
PR merge metrics
No merged PRs in 30d

Description

https://github.com/aiogram/bot/blob/5d892a24724b3cd9b50928f1f5753e8b38d537c4/app/handlers/superuser.py#L9

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("/")`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.