【发布时间】:2021-08-08 14:02:13
【问题描述】:
我做了什么:
我尝试在我的嵌入中添加自定义表情符号。然而,这并没有成功。也许我正在使用过时的代码?我不确定到底是什么导致它不起作用。我没有从控制台得到任何反馈,我的所有其他命令都可以正常工作。
@bot.command()
async def react(ctx):
channel = bot.get_channel(865698553737117696)
firework = get(ctx.message.server.emojis, name="firework")
phone = get(ctx.message.server.emojis, name= "socials")
react = discord.Embed(title = 'Reaction Roles:',description = 'Below are a range of reaction roles that allows you to be pinged when we announce something exciting:\n',colour = 0xE23D6E)
react.set_author(name='Disney Dreams', icon_url= 'https://cdn.discordapp.com/attachments/809937571793993730/866327668970881034/logogoosggs.png')
react.add_field(name='**Shows**', value=f'{firework}' + ': Allows you to get pinged when we make an announcement relating to shows here at Disney Dreams', inline= False)
react.add_field(name='**Social Media**',
value=f'{phone}' + ': Allows you to get pinged when we make a post on one of our social media pages', inline=False)
reactions = await channel.send(embed=react)
await reactions.add_reaction(':firework:')
await reactions.add_reaction(':socials:')
【问题讨论】:
标签: python python-3.x discord discord.py