ccvv222
ccvv222

Reputation: 3

How to add reaction to everything that certain user says

Hi i have a problem because i want to add reaction to everything that certain user says but it unfortunately doesn't work and i have no idea why. Can somehone help me?

import discord

client = discord.Client()


@client.event
    async def on_ready():
    print('I logged in as: {0.user}'.format(client))


@client.event
    async def on_message(msg):
    if msg.author == 'user id here':
        await msg.add_reaction('💩')


client.run('token')

Upvotes: 0

Views: 41

Answers (1)

thegigabyte
thegigabyte

Reputation: 131

msg.author returns the author's discord tag, not the ID.

Use msg.author.id instead.

Upvotes: 1

Related Questions