#make bot react to specific user

10 messages · Page 1 of 1 (latest)

zinc tulip
#
@client.listen()
async def on_message(message):
    if message.author.id == "583566333741105153":
        reaction = '👋'
        await message.add_reaction(reaction)```

this is the code I have right now
simple plaza
#

Don't put the number in quotes.

zinc tulip
#

...oop

#

I do need to modify this to take discord emojis though

#

hmm, if I can remember how

modest isle
#

Member.id is an int so comparing it to a str will be False, so remove the quotes like zech said.
also use the .ext.commands extension instead of using the on_message listener

simple plaza
#

You can't use commands to respond to a single user's every message. A command requires a message to start with a set prefix.

modest isle
#

yeah, i meant to add to use it when you start adding 'commands' inside of on_message, mb

ivory lintel
#

setup_hook() is a lot better to use than on_ready() when checking if ur bot is up btw