Reputation: 61
Im trying to make a discord.py rewrite bot add a emoji to its own message but keeps adding emoji to the users message.
here is my code.
@client.event
async def on_message(message):
if message.author.bot:
return
if message.content.lower() == "hi":
em=discord.Embed(description=f"Hello, {message.author.name}",color=discord.Colour.red())
await message.channel.send(embed = em)
for emoji in ('đ'):
await message.add_reaction(emoji)
Upvotes: 1
Views: 111
Reputation: 15689
Because message
is the message that the user sent, not the bot.
msg = await message.channel.send(embed=em)
await msg.add_reaction('đ')
Upvotes: 1