#Import SlashCommandGroup from main into cogs

1 messages · Page 1 of 1 (latest)

verbal inlet
#

you dont

#

but feel free to look about pycord-multicog

nova forum
#

thanks

nova forum
#

and i mean not the github repo

verbal inlet
nova forum
#

sure

#

or is this wrong

verbal inlet
#

what is wrong ?

nova forum
#

you said there is no repo

verbal inlet
#

i say there is example on the github repo

nova forum
#

but i dont understand these examples

verbal inlet
#

well i cant really do anything

nova forum
#

okay

verbal inlet
#

like here my command :

    @subcommand("mod")
    @slash_command()
    async def ban(self, ctx):
        ...
nova forum
#

yes i understand

#

but where i have to create the slashcommandgroup

#

...in the main?

verbal inlet
#

no in a cog

nova forum
#
    german = discord.SlashCommandGroup("german")
    league = german.create_subgroup("league")

    @league.command(
        name="table",
        description="Shows you the current table of a german league."
    )

so like this

#
    @subcommand("german")
    @discord.slash_command(
        name="team",
        description="Shows informations about the selected Club."
    )

and in a other cog like this

verbal inlet
#

yeah

nova forum