Reputation: 11
My on_reaction_add
seems to be not working. Here's my code:
import discord
import asyncio
import datetime
client = discord.Client()
@client.event
async def on_ready():
print('Logged in as', client.user)
print('( name =', client.user.name, ', id =', client.user.id, ')')
activity = discord.Game(name="&b help")
await client.change_presence(status=discord.activity, activity=activity)
@client.event
async def on_reaction_add(reaction, user):
await channel.send('test')
There is no error. Why does not it work?
Upvotes: 1
Views: 3557
Reputation: 116
The event on_reaction_add
is called when a message has a reaction added to it. If the message is not found in the internal message cache, then this event will not be called. The cache is cleared after every restart.
Upvotes: 2