Answer the question
In order to leave comments, you need to log in
Issuing roles by reaction?
import discord
@client.event
async def on_ready():
Channel = client.get_channel('819245759706300437')
Text= "819248816892936222"
Moji = await client.send_message(Channel, Text)
await client.add_reaction(Moji, emoji='')
@client.event
async def on_reaction_add(reaction, user):
Channel = client.get_channel('819245759706300437')
if reaction.message.channel.id != Channel
return
if reaction.emoji == "":
Role = discord.utils.get(user.server.roles, name="Деранкер FACEIT")
await client.add_roles(user, Role)
client = RoleReactClient(intents=intents)
client.run("тут токен")
Answer the question
In order to leave comments, you need to log in
You need to initialize the client before the functions, move it client = RoleReactClient(intents=intents)
to the beginning of the code or add it client = discord.Client()
at the beginning
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question