【发布时间】:2020-07-09 23:05:07
【问题描述】:
我正在尝试通过以下方法将嵌入消息发送到指定频道。但是,当我将其单独或与其他任何东西一起放入时,嵌入消息不会发送。但是,发送字符串工作正常。
@bot.command()
@commands.cooldown(1, 10, commands.BucketType.user)
async def report(ctx, user, reason):
if ctx.channel.id == 730496513255669881:
channel = bot.get_channel(730432681657237594)
embedstaff = discord.Embed(title="A new player report has been submitted!", color=0xff6a00)
embedstaff.add_field(name="Player/User Reported", value=ctx.author.name, inline=True)
embedstaff.add_field(name="Reporter", value="Lol", inline=True)
embedstaff.add_field(name="Report Reason: " + reason, value="", inline=False)
await channel.send("Heyy x3", embed = embedstaff)
是否有其他方法可以将消息发送到指定频道?或者我现在使用的方法有解决方案吗? (怎么提个角色也不错哈哈)
【问题讨论】:
标签: python python-3.x discord discord.py