aiogram / aiogram/bot

The command `!set_superuser` won't work

Aperta
#6 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug good first issue upstream
Lingua principale
Python
Stelle
282
Fork
58
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.