T
T
tatsuki12021-07-23 16:15:39
Python
tatsuki1, 2021-07-23 16:15:39

How can I make a channel be created when clicking on an emoji?

I am writing a discord bot in Python using the discord.py library, and at the moment I am writing a ticket system, and when I write a command, a channel is created, and 3 categories, a message is created in the support channel, and under it the emoji that you click on should be created channel, but I don't understand how to do it

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
RAINGM, 2021-07-23
@RAINGM

message_object = ...
def check(arg):
    if ctx.author.id == arg.user_id:
        return str(arg.emoji) == '✅' or str(arg.emoji) == '❌'
await message_object.add_reaction('✅')
await message_object.add_reaction('❌')
payload = await self.bot.wait_for('raw_reaction_add', timeout=60.0, check=check)
if str(payload.emoji) == '✅':
    pass
elif str(payload.emoji) == '❌':
    pass

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question