aiogram / aiogram/bot

The command `!set_superuser` won't work

オープン
#6 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug good first issue upstream
主要言語
Python
スター
282
フォーク
58
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。