question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

commands.Group() for slash commands

See original GitHub issue

Summary

commands.Group(), but for slash commands (sub-commands)

What is the feature request for?

disnake.ext.commands

The Problem

I am trying to use sub-commands (for slash commands) with commands.Bot, but the only Group I found in the documentation is commands.Group() which is for regular commands.

The Ideal Solution

Adding something like commands.SlashCommandGroup() that will allow us to make sub-commands with commands.SlashCommandGroup().slash_command()

The Current Solution

No response

Additional Context

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
m1rayneecommented, Sep 30, 2021

mod party

1reaction
EQUENOScommented, Sep 30, 2021

This feature already exists, but it differs from the usual text command group. Here’s how it works:

@bot.slash_command()
async def parent(inter):
    pass

@parent.sub_command()
async def subcmd(inter):
    pass

This will be displayed as /parent subcmd

You can make double nesting, like so:

@bot.slash_command()
async def parent(inter):
    pass

@parent.sub_command_group()
async def group(inter):
    pass

@group.sub_command()
async def subcmd(inter):
    pass

This will be displayed as /parent group subcmd

Read more comments on GitHub >

github_iconTop Results From Across the Web

Slash Commands - disnake
Groups of commands work differently in terms of slash commands. Instead of defining a group, you should still define a slash command and...
Read more >
Slash command sub groups and sub commands should be ...
Right now all sub command groups and sub commands are returned as part of the options field, this makes them more difficult to...
Read more >
Slash Commands - Pycord Guide
You might want to group certain commands together to make them more organised. A command group is exactly what it sounds like, a...
Read more >
Advanced command creation - discord.js Guide
The names and descriptions of slash commands can be localized to the user's selected language. You can find the list of accepted locales...
Read more >
Slash commands in Slack
Built-in slash commands ; Slash command, Action ; /archive, Archive the current channel ; /call, Start a call ; /collapse, Collapse all inline...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found