【发布时间】:2020-05-17 11:39:49
【问题描述】:
我想知道如何通过消息 ID 获取消息。我试过discord.fetch_message(id)和discord.get_message(id),但都加注:
Command raised an exception: AttributeError: module 'discord' has no attribute 'fetch_message'/'get_message'
【问题讨论】:
-
请参阅:stackoverflow.com/a/49419190、discordpy.readthedocs.io/en/rewrite/…。认为语法是
channel.fetch_message(id) -
你能做 guild.fetch_message(id) 吗?
-
好的,还有一个问题,你如何获得他们发送命令的当前频道?
-
哦,好的,我看到你的下一个回复后发送了,对此感到抱歉
-
guild = ctx.guild channel = guild.channels message = await channel.fetch_message(int(id)) raises: 命令引发异常:AttributeError: 'list' object has no attribute 'fetch_message'
标签: python url-rewriting discord.py message