aiogram / aiogram/bot

The command `!set_superuser` won't work

未关闭
#6 0 条评论 0 个 reaction 已指派 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 摘要。