I can't understand why it says there two arguments when I gave one?
When I try to execute this code
@bot.event
async def on_reaction_add(reaction):
fp = reaction.message.guild.name
l = reaction.message
if os.path.isfile(ph + fp + '-bug.txt'):
f = open(ph + fp + '-bug.txt')
u = open(ph + fp + '-mod.txt')
lines1 = u.readlines()
lines = f.readlines()
if str(l.channel.id) == lines1[0]:
if reaction.emoji == "✅":
channel = bot.get_channel(int(lines[0]))
await channel.send(l.content)
elif reaction.emoji == "❌":
await l.delete()
i get this error
Traceback (most recent call last):
File "C:\Users\---\PycharmProjects\---\venv\lib\site-packages\discord\client.py", line 312, in _run_event
await coro(*args, **kwargs)
TypeError: on_reaction_add() takes 1 positional argument but 2 were given```