pycord icon indicating copy to clipboard operation
pycord copied to clipboard

Slashcommandgroup decorator

Open waifusempire opened this issue 1 year ago • 3 comments

Summary

The decorator should replace the function with the command group

What is the feature request for?

The core library

The Problem

from discord import Cog, SlashCommandGroup

class Example(Cog):
    channel = SlashCommandGroup("channel", "Example") # Current way
    test = channel.create_subgroup("test", "Test Description")

The Ideal Solution

from discord import Cog, slash_command_group

class Example(Cog):
    @slash_command_group() #optional name & description override 
     def channel(self): # Better way
         "Example"

     @slash_command_group(parent=channel)
     def test(self):
         "Test Description"

The Current Solution

No response

Additional Context

No response

waifusempire avatar Sep 10 '22 21:09 waifusempire

How is this helpful? The parent Slash Command Group cannot have any callback if there are children.

JustaSqu1d avatar Sep 11 '22 22:09 JustaSqu1d

i just think it will be easier

waifusempire avatar Sep 11 '22 22:09 waifusempire

This will be over complicated

Lulalaby avatar Sep 14 '22 17:09 Lulalaby