Skip to content

Resources


command

GlobalCommand dataclass

Bases: BaseResource


              flowchart TD
              scurrypy.resources.command.GlobalCommand[GlobalCommand]
              scurrypy.resources.base_resource.BaseResource[BaseResource]

                              scurrypy.resources.base_resource.BaseResource --> scurrypy.resources.command.GlobalCommand
                


              click scurrypy.resources.command.GlobalCommand href "" "scurrypy.resources.command.GlobalCommand"
              click scurrypy.resources.base_resource.BaseResource href "" "scurrypy.resources.base_resource.BaseResource"
            

Represents a global command.

application_id: Snowflake instance-attribute

Application ID of the commands.

fetch async

Fetches a command object.

Parameters:

  • command_id (int) –

    ID of the command to fetch

Returns:

fetch_all async

Fetches ALL global commands.

Returns:

create async

Add a command to the client.

Danger

Creating a command with the same name as an existing command in the same scope will overwrite the old command.

Parameters:

Returns:

edit async

Edit a command.

Parameters:

Returns:

delete async

Delete a command.

Parameters:

  • command_id (Snowflake) –

    ID of the command to delete

bulk_overwrite async

Takes a list of application commands, overwriting existing commands list for this application.

Warning

Commands that do not already exist will count toward daily application command create limits.

Danger

This will overwrite all types of application commands: slash commands, user commands, and message commands.

Parameters:

Returns:

GuildCommand dataclass

Bases: BaseResource


              flowchart TD
              scurrypy.resources.command.GuildCommand[GuildCommand]
              scurrypy.resources.base_resource.BaseResource[BaseResource]

                              scurrypy.resources.base_resource.BaseResource --> scurrypy.resources.command.GuildCommand
                


              click scurrypy.resources.command.GuildCommand href "" "scurrypy.resources.command.GuildCommand"
              click scurrypy.resources.base_resource.BaseResource href "" "scurrypy.resources.base_resource.BaseResource"
            

Represents a guild command.

application_id: Snowflake instance-attribute

Application ID of the commands.

guild_id: Snowflake instance-attribute

Guild ID of command.

fetch async

Fetches the command object.

Parameters:

  • command_id (int) –

    ID of command to fetch

Returns:

fetch_all async

Fetches ALL guild commands.

Returns:

create async

Add a command to the client.

Danger

Creating a command with the same name as an existing command in the same scope will overwrite the old command.

Parameters:

Returns:

edit async

Edit a command.

Parameters:

Returns:

delete async

Delete a command.

Parameters:

  • command_id (Snowflake) –

    ID of command to delete

bulk_overwrite async

Takes a list of application commands, overwriting existing commands list for this guild.

Warning

Commands that do not already exist will count toward daily application command create limits.

Danger

This will overwrite all types of application commands: slash commands, user commands, and message commands.

Parameters:

Returns: