我正在尝试编辑已发送的嵌入消息(用作角色反应消息)。例如:我输入“角色”并收到一条嵌入消息,该消息在响应时分配角色。我想编辑它以在描述中添加另一个角色,而不发送全新的消息。MEE6 机器人能够做到这一点,所以我确信这是可能的。我找到了应该可以工作的代码:
# This sends an embed message with a description of the roles.
@client.event
async def on_message(message):
if message.channel.id == 700895165665247325:
if message.content.startswith('roles'):
embedvar = discord.Embed(title="React to this message to get your roles!",
description="Click the corresponding emoji to receive your role.\n<:WarThunder:"
"745425772944162907> - War Thunder\n<:Apex:745425965764575312> - "
"Apex\n<:ModernWarfare:757104623738814554> - "
"Modern Warfare\n<:Minecraft:757029546632413346> - "
"Minecraft\n<:R6Siege:757030019909550122> - R6 Siege", color=0x00ff00)
embedvar2 = discord.Embed(title="React to this message to get your roles!",
description="Click the corresponding emoji to receive your role.\n<:WarThunder:"
"745425772944162907> - War Thunder\n<:Apex:745425965764575312> - "
"Apex\n<:ModernWarfare:757104623738814554> - "
"Modern Warfare\n<:Minecraft:757029546632413346> - "
"Minecraft\n<:R6Siege:757030019909550122> - R6 Siege\n"
但它给了我这个错误:
discord.errors.Forbidden: 403 Forbidden (error code: 50005): Cannot edit a message authored by another user
是的,机器人拥有所有正确的权限,并且在层次结构中分配的级别低于它。
慕码人8056858
慕姐8265434
相关分类