Answer the question
In order to leave comments, you need to log in
How to make a command with pages?
I found code in the discord.py documentation
that : Performs an action with a reaction click .
and I want to make a HELP command and so that there are several pages, but I
only get it when I click the first and then the second and you can’t select my code:
@bot.event
async def on_message(message):
if message.content.startswith('(help'):
channel = message.channel
check = await channel.send('HELP\nSearch reaction\n `Sundry` = \n`Fun` = ☺')
await check.add_reaction('')
await check.add_reaction('☺')
def check(reaction, user):
return user == message.author and str(reaction.emoji) == ''
try:
reaction, user = await bot.wait_for('reaction_add', timeout=60.0, check=check)
except asyncio.TimeoutError:
await channel.send('_____')
else:
embed = discord.Embed(title="sundry", description="`(help` - help\n `(clearchat clsc` - Clear chat\n `(tree` - tree \n `(grassblock` - grassblock" , color=0xcce734)
embed.set_author(name="HELP!")
embed.add_field(name="by Supchik ", value="=)", inline=False)
embed.set_footer(text="_All rights reserved_")
await channel.send(message.channel, embed=embed)
def gg(reaction, user):
return user == message.author and str(reaction.emoji) == '☺'
try:
reaction, user = await bot.wait_for('reaction_add', timeout=60.0, check=gg)
except asyncio.TimeoutError:
print('=(')
else:
embed = discord.Embed(title="Fun",
description="meme - meme",
color=0xcce734)
embed.set_author(name="HELP!")
embed.add_field(name="by Supchik ", value="=)", inline=False)
embed.set_footer(text="_All rights reserved_")
await channel.send(message.channel, embed=embed)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question