But not worked for me..,
import discord
from discord.ext.commands import Bot
from discord.ext import commands
import asyncio
import time
import random
from discord import Game
import math, time
from discord.ext import commands
from discord.utils import get
Client = discord.client
client = commands.Bot(command_prefix = '!')
Clientdiscord = discord.Client()
@client.event
async def on_ready():
Channel = client.get_channel('524415641310986252')
Text= "testt!"
Moji = await client.send_message(Channel, Text)
await client.add_reaction(Moji, emoji='\U0001F3D3')
client.loop.create_task(on_reaction_add())
@client.event
async def on_reaction_add(reaction, user):
Channel = client.get_channel('524415641310986252')
if reaction.message.channel.id != Channel:
return
if reaction.emoji == "\U0001F3D3":
Role = discord.utils.get(user.server.roles, name="verified")
await client.add_roles(user, Role)
await client.add_roles(reaction.message.author, role)
client.run("My_Token")
- \U0001F3D3 = :ping_pong: ,use unicode
so it work, but gave me some error
Ignoring exception in on_ready Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\discord\client.py", line 307, in _run_event yield from getattr(self, event)(*args, **kwargs) File "C:\Users\Administrator\Desktop\project_Bot_manage - - Copy - Copy.py", line 24, in on_ready client.loop.create_task(on_reaction_add()) TypeError: on_reaction_add() missing 2 required positional arguments: 'reaction' and 'user'
Please I need help , I'm still new here with discord.py