同步警告:无法覆盖公会中的命令,缺少访问权限



我开始收到警告(当我启动机器人程序时(:

disnakeextcommandsinteraction_bot_base.py:733: SyncWarning: Failed to overwrite commands in <Guild id=889176263992963142> due to 403 Forbidden (error code: 50001): Missing Access
warnings.warn(

尝试定位它,但这个错误应该发生在(最后一个(:

async def _sync_application_command_permissions(self) -> None:
# Assuming that permissions and commands are cached
if not isinstance(self, disnake.Client):
raise NotImplementedError(f"This method is only usable in disnake.Client subclasses")

我发出的警告是完整的信息。我也试过回到几个版本,当时我确信它没有产生这个警告,但它现在开始出现了。

机器人受到邀请,包括applications.commands范围。

使用的库是disnake,如果有人能为它创建一个特定的标签,那就太好了。

问题是,在不在场的情况下试图访问test_guild(我已经从它所在的两个公会之一踢出了机器人(。

bot = commands.Bot(
command_prefix=commands.when_mentioned_or("!"), 
test_guilds=[guild_id1, guild_id2], 
intents=disnake.Intents.all()
)

删除这个额外的公会解决了这个问题。

最新更新