Skip to content

Objects


Application Command


application_command

ApplicationCommandOptionChoiceModel dataclass

Bases: DataModel


              flowchart TD
              scurrypy.api.commands.application_command.ApplicationCommandOptionChoiceModel[ApplicationCommandOptionChoiceModel]
              scurrypy.core.model.DataModel[DataModel]

                              scurrypy.core.model.DataModel --> scurrypy.api.commands.application_command.ApplicationCommandOptionChoiceModel
                


              click scurrypy.api.commands.application_command.ApplicationCommandOptionChoiceModel href "" "scurrypy.api.commands.application_command.ApplicationCommandOptionChoiceModel"
              click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
            

Represents the application command option choice object.

name: str instance-attribute

Name of the choice.

value: str instance-attribute

Value for the choice.

Note

Convert based on expected type (str, int or double)

ApplicationCommandOptionModel dataclass

Bases: DataModel


              flowchart TD
              scurrypy.api.commands.application_command.ApplicationCommandOptionModel[ApplicationCommandOptionModel]
              scurrypy.core.model.DataModel[DataModel]

                              scurrypy.core.model.DataModel --> scurrypy.api.commands.application_command.ApplicationCommandOptionModel
                


              click scurrypy.api.commands.application_command.ApplicationCommandOptionModel href "" "scurrypy.api.commands.application_command.ApplicationCommandOptionModel"
              click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
            

Represents the application command option object.

type: CommandOptionType instance-attribute

Type of command option.

name: str instance-attribute

Name of the command option.

descripton: str instance-attribute

Description for the command option.

required: bool | None instance-attribute

Whether this option is required. Discord defaults to False.

choices: list[ApplicationCommandOptionChoiceModel] | None instance-attribute

Choices for the user to pick from.

channel_types: list[int] | None instance-attribute

Channels shown will be restricted to these types.

min_value: int | None instance-attribute

Minimum value allowed.

max_value: int | None instance-attribute

Maximum value allowed.

min_length: int | None instance-attribute

Minimum length allowed.

max_length: int | None instance-attribute

Maximum length allowed.

autocomplete: bool | None instance-attribute

Whether autocomplete interactions are enabled for this option.

ApplicationCommandModel dataclass

Bases: DataModel


              flowchart TD
              scurrypy.api.commands.application_command.ApplicationCommandModel[ApplicationCommandModel]
              scurrypy.core.model.DataModel[DataModel]

                              scurrypy.core.model.DataModel --> scurrypy.api.commands.application_command.ApplicationCommandModel
                


              click scurrypy.api.commands.application_command.ApplicationCommandModel href "" "scurrypy.api.commands.application_command.ApplicationCommandModel"
              click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
            

Represents the application command object.

id: Snowflake instance-attribute

Unique ID of command.

type: CommandType | None instance-attribute

Type of command. Discord defaults to ApplicationCommandTypes.CHAT_INPUT.

application_id: Snowflake instance-attribute

ID of the parent application.

guild_id: Snowflake | None instance-attribute

Guild ID of the command, if not global.

name: str instance-attribute

Name of the command.

description: str instance-attribute

Description for CHAT_INPUT commands.

Note

Empty for USER and MESSAGE commands.

options: list[ApplicationCommandOptionModel] | None instance-attribute

Parameters for the command.

default_member_permissions: Permissions instance-attribute

Set of permissions represented as a bit set. [INT_LIMIT]

nsfw: bool | None instance-attribute

Whether the command is age-restricted. Discord defaults to False.

Context Commands


context

UserCommandPart dataclass

Bases: DataModel


              flowchart TD
              scurrypy.api.commands.context.UserCommandPart[UserCommandPart]
              scurrypy.core.model.DataModel[DataModel]

                              scurrypy.core.model.DataModel --> scurrypy.api.commands.context.UserCommandPart
                


              click scurrypy.api.commands.context.UserCommandPart href "" "scurrypy.api.commands.context.UserCommandPart"
              click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
            

Represents the user command object.

name: str | None = None class-attribute instance-attribute

Name of the command.

type: CommandType = field(init=False, default=(CommandType.USER)) class-attribute instance-attribute

Command type. Always CommandType.USER for this class.

MessageCommandPart dataclass

Bases: DataModel


              flowchart TD
              scurrypy.api.commands.context.MessageCommandPart[MessageCommandPart]
              scurrypy.core.model.DataModel[DataModel]

                              scurrypy.core.model.DataModel --> scurrypy.api.commands.context.MessageCommandPart
                


              click scurrypy.api.commands.context.MessageCommandPart href "" "scurrypy.api.commands.context.MessageCommandPart"
              click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
            

Represents the message command object.

name: str | None = None class-attribute instance-attribute

Name of the command.

type: CommandType = field(init=False, default=(CommandType.MESSAGE)) class-attribute instance-attribute

Command type. Always CommandType.MESSAGE for this class.

Slash Commands


slash

CommandOptionChoicePart dataclass

Bases: DataModel


              flowchart TD
              scurrypy.api.commands.slash.CommandOptionChoicePart[CommandOptionChoicePart]
              scurrypy.core.model.DataModel[DataModel]

                              scurrypy.core.model.DataModel --> scurrypy.api.commands.slash.CommandOptionChoicePart
                


              click scurrypy.api.commands.slash.CommandOptionChoicePart href "" "scurrypy.api.commands.slash.CommandOptionChoicePart"
              click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
            

Choice for a command option.

name: str | None = None class-attribute instance-attribute

Name of the choice.

value: str | int | float | None = None class-attribute instance-attribute

Value for the user to select (same as option type).

name_localizations: JSON | None = None class-attribute instance-attribute

Dictionary with keys in available locales.

CommandOptionPart dataclass

Bases: DataModel


              flowchart TD
              scurrypy.api.commands.slash.CommandOptionPart[CommandOptionPart]
              scurrypy.core.model.DataModel[DataModel]

                              scurrypy.core.model.DataModel --> scurrypy.api.commands.slash.CommandOptionPart
                


              click scurrypy.api.commands.slash.CommandOptionPart href "" "scurrypy.api.commands.slash.CommandOptionPart"
              click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
            

Option for a slash command.

type: CommandOptionType | None = None class-attribute instance-attribute

Type of option.

name: str | None = None class-attribute instance-attribute

Name of option.

description: str | None = None class-attribute instance-attribute

Description of option.

required: bool | None = None class-attribute instance-attribute

Whether this option is required. Discord defaults to False.

choices: list[CommandOptionChoicePart] | None = None class-attribute instance-attribute

Choices for the user to pick from, max 25. Only valid for STRING, INTEGER, NUMBER option types.

autocomplete: bool | None = None class-attribute instance-attribute

Whether autocomplete interactions are enabled for this option. Discord defaults to False.

SlashCommandPart dataclass

Bases: DataModel


              flowchart TD
              scurrypy.api.commands.slash.SlashCommandPart[SlashCommandPart]
              scurrypy.core.model.DataModel[DataModel]

                              scurrypy.core.model.DataModel --> scurrypy.api.commands.slash.SlashCommandPart
                


              click scurrypy.api.commands.slash.SlashCommandPart href "" "scurrypy.api.commands.slash.SlashCommandPart"
              click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
            

Represents the slash command object.

name: str | None = None class-attribute instance-attribute

Name of the command.

description: str | None = None class-attribute instance-attribute

Description of the command.

options: list[CommandOptionPart] | None = None class-attribute instance-attribute

Parameters or options for the command.

type: CommandType = field(init=False, default=(CommandType.CHAT_INPUT)) class-attribute instance-attribute

Command type. Always CommandType.CHAT_INPUT for this class.