S
S
Shandy2021-02-08 18:46:49
Python
Shandy, 2021-02-08 18:46:49

How to make a help command?

The standard command does not look very nice, I wanted to redo it, but I don’t quite understand how to do it. It seems to be in the documentation , but I did not understand anything. Can you somehow explain how I can take the name of the command, its description and display it as an embed.
I also made a "static" text, but it's not cool to edit the description every time and so on.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladislav Mukhin, 2021-02-08
@SladkayaDoza

@Client.command()
async def help(ctx):
    emb1 = discord.Embed(title="Информация о командах", color=random.randint(1, 16777216))
    emb1.add_field(name = f"`{PREFIX}help` : ", value="Вызовет это меню", inline=False)
    message = await ctx.send(embed = emb1)

If you need to display text as a simple message then:
@Client.command()
async def help(ctx):
    await ctx.send(f"ваш текст")  #перенос строки осуществляется добавлением: \n без кнопки Enter!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question