【发布时间】:2021-05-17 04:10:27
【问题描述】:
@client.event
async def on_message(message):
if client.user.mentioned_in(message):
embed = discord.Embed(title='Im here boss', description='Prefix: `n!help`', color=discord.Colour.from_rgb(249, 35, 142))
embed.set_image(url='https://i.pinimg.com/originals/fe/1d/60/fe1d606ca0bcaf954a78cae3ed9c628b.gif')
embed.set_footer(icon_url = ctx.author.avatar_url, text = f'Brought here by {ctx.author.name}')
await message.channel.send(embed=embed)
如果我在 async def 中添加 ctx,它会显示一个错误并且它没有定义,并且在页脚中它也没有定义。我怎么在这里定义这个东西的ctx?
【问题讨论】:
标签: discord.py