#Making slash help commands

1 messages · Page 1 of 1 (latest)

alpine basin
ripe imp
#

Now im using this, and idk what error is raised when embed is at max fields lol

static creek
#

Hello Guys,
I need help, actually I'm trying to make a help command which automatically detects slash cmd's and it cogs.
Can someone give me an example how to do it

pale loom
#

Um

static creek
#

C'mon

#

Pls help

pearl token
#

why do you need that?

static creek
tidal rune
#

what

static creek
tidal rune
#

i mean

#

cog.get_commands returns a list of the cog's application commands

tidal rune
#

so then you just work through those for your help command

static creek
#

I need a demo

tidal rune
#

though considering how descriptive slash commands are you really don't need one

tidal rune
#

but they literally all show up when you type /

#

with names, descriptions, argument descriptions

#

discord itself is the help UI

static creek
tidal rune
#

?? they search for the command they want

static creek
#

Some of them doesn't even know about slash commands

#

Or how does bots work

tidal rune
#

there's no need to infantilize your userbase, they're probably at least slightly more capable than you're making them out to be

static creek
#

Why dank memer has help slash cmd's

#

And many verified bots have it

tidal rune
#

i'm not saying you can't have them, it's just unnecessary lol

static creek
#

It is necessary for me

tidal rune
#

most current bots only have them because they already had a help command from prefix commands

static creek
#

I get spammed for making help cmd

static creek
tidal rune
#

as for that demo, something like

for cog_name, cog in bot.cogs.items():
  for command in commands:
    name = command.name
    description = command.description
    ...
#

you can at least figure out what you want to do from there

static creek
tidal rune
#

however you plan to create the command

static creek
#
@bot.slash_command()
async def help(ctx) :
for cog_name, cog in bot.cogs.items():
  for command in commands:
    name = command.name
    description = command.description
    embed=discord.Embed(
title = "Help Commands" , 
description=
)
await ctx.respond(embed=embed) 
#

8'm confused :o

tidal rune
#

all the demo i posted does is go through every cog and every slash command in that cog

#

it's up to you to do something with that

#

e.g. maybe you append all the names and descriptions to a list, then outside the loop you format that and make an embed

static creek
pale loom
#

U can do it as embed