0
votes

I'm writing a custom help command that sends a embed DM to a user, that all works fine. As part of the command, I'm trying to make the bot react to the command message but I cannot get it to work, I've read the documentation but I still can't seem to get it to react as part of a command. Below is the what I'm trying to achieve:

@client.command(pass_context=True)
async def help(ctx):
    # React to the message
    
    author = ctx.message.author

    help_e = discord.Embed(
        colour=discord.Colour.orange()
    )
    help_e.set_author(name='The bot\'s prefix is !')
    help_e.add_field(name='!latency', value='Displayes the latency of the bot', inline=False)
    help_e.add_field(name='!owo, !uwu, !rawr', value='Blursed commands', inline=False)

    await author.send(embed=help_e)```
1

1 Answers

0
votes

You can use message.add_reaction() and also you can use ctx.message to add reaction to the message. Here is what you can do:

@client.command(pass_context=True)
async def help(ctx):
    # React to the message
    await ctx.message.add_reaction('✅')
    author = ctx.message.author

    help_e = discord.Embed(
        colour=discord.Colour.orange()
    )
    help_e.set_author(name='The bot\'s prefix is !')
    help_e.add_field(name='!latency', value='Displayes the latency of the bot', inline=False)
    help_e.add_field(name='!owo, !uwu, !rawr', value='Blursed commands', inline=False)

    sent_embed = await author.send(embed=help_e)