aiogram / aiogram/bot

The command `!set_superuser` won't work

Ouverte
#6 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
bug good first issue upstream
Langage dominant
Python
Étoiles
282
Forks
58
Métriques de merge des PR
Aucune PR mergée en 30 j

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

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.