Objects¶
Context Commands¶
context
¶
UserCommandPart
dataclass
¶
Bases: Part
flowchart TD
scurrypy.api.commands.context.UserCommandPart[UserCommandPart]
scurrypy.core.part.Part[Part]
scurrypy.core.part.Part --> scurrypy.api.commands.context.UserCommandPart
click scurrypy.api.commands.context.UserCommandPart href "" "scurrypy.api.commands.context.UserCommandPart"
click scurrypy.core.part.Part href "" "scurrypy.core.part.Part"
Represents fields for creating an user command object.
MessageCommandPart
dataclass
¶
Bases: Part
flowchart TD
scurrypy.api.commands.context.MessageCommandPart[MessageCommandPart]
scurrypy.core.part.Part[Part]
scurrypy.core.part.Part --> scurrypy.api.commands.context.MessageCommandPart
click scurrypy.api.commands.context.MessageCommandPart href "" "scurrypy.api.commands.context.MessageCommandPart"
click scurrypy.core.part.Part href "" "scurrypy.core.part.Part"
Represents fields for creating a message command object.
Slash Commands¶
slash
¶
CommandOptionChoicePart
dataclass
¶
Bases: Part
flowchart TD
scurrypy.api.commands.slash.CommandOptionChoicePart[CommandOptionChoicePart]
scurrypy.core.part.Part[Part]
scurrypy.core.part.Part --> scurrypy.api.commands.slash.CommandOptionChoicePart
click scurrypy.api.commands.slash.CommandOptionChoicePart href "" "scurrypy.api.commands.slash.CommandOptionChoicePart"
click scurrypy.core.part.Part href "" "scurrypy.core.part.Part"
Represents fields for creating an option choice.
CommandOptionPart
dataclass
¶
Bases: Part
flowchart TD
scurrypy.api.commands.slash.CommandOptionPart[CommandOptionPart]
scurrypy.core.part.Part[Part]
scurrypy.core.part.Part --> scurrypy.api.commands.slash.CommandOptionPart
click scurrypy.api.commands.slash.CommandOptionPart href "" "scurrypy.api.commands.slash.CommandOptionPart"
click scurrypy.core.part.Part href "" "scurrypy.core.part.Part"
Represents fields for creating a slash command option.
type: RequiredPartField[CommandOptionType] = None
class-attribute
instance-attribute
¶
Type of option.
name: RequiredPartField[str] = None
class-attribute
instance-attribute
¶
Name of option.
description: RequiredPartField[str] = None
class-attribute
instance-attribute
¶
Description of option.
required: OptionalPartField[bool] = None
class-attribute
instance-attribute
¶
Whether this option is required. Discord defaults to False.
choices: OptionalPartField[list[CommandOptionChoicePart]] = None
class-attribute
instance-attribute
¶
Choices for the user to pick from, max 25. Only valid for STRING, INTEGER, NUMBER option types.
autocomplete: OptionalPartField[bool] = None
class-attribute
instance-attribute
¶
Whether autocomplete interactions are enabled for this option. Discord defaults to False.
SubcommandPart
dataclass
¶
Bases: Part
flowchart TD
scurrypy.api.commands.slash.SubcommandPart[SubcommandPart]
scurrypy.core.part.Part[Part]
scurrypy.core.part.Part --> scurrypy.api.commands.slash.SubcommandPart
click scurrypy.api.commands.slash.SubcommandPart href "" "scurrypy.api.commands.slash.SubcommandPart"
click scurrypy.core.part.Part href "" "scurrypy.core.part.Part"
Represents fields for creating a subcommand.
name: RequiredPartField[str] = None
class-attribute
instance-attribute
¶
Name of the subcommand.
description: OptionalPartField[str] = None
class-attribute
instance-attribute
¶
Description of the subcommand.
options: OptionalPartField[list[CommandOptionPart]] = None
class-attribute
instance-attribute
¶
Parameters or options for the subcommand.
type: CommandOptionType = field(init=False, default=(CommandOptionType.SUB_COMMAND))
class-attribute
instance-attribute
¶
Command type. Always CommandOptionType.SUB_COMMAND for this class.
SubcommandGroupPart
dataclass
¶
Bases: Part
flowchart TD
scurrypy.api.commands.slash.SubcommandGroupPart[SubcommandGroupPart]
scurrypy.core.part.Part[Part]
scurrypy.core.part.Part --> scurrypy.api.commands.slash.SubcommandGroupPart
click scurrypy.api.commands.slash.SubcommandGroupPart href "" "scurrypy.api.commands.slash.SubcommandGroupPart"
click scurrypy.core.part.Part href "" "scurrypy.core.part.Part"
Represents fields for creating a subcommand group.
name: RequiredPartField[str] = None
class-attribute
instance-attribute
¶
Name of the subcommand group.
description: OptionalPartField[str] = None
class-attribute
instance-attribute
¶
Description of the subcommand group.
options: RequiredPartField[list[SubcommandPart]] = None
class-attribute
instance-attribute
¶
Subcommands for the subcommand group.
type: CommandOptionType = field(init=False, default=(CommandOptionType.SUB_COMMAND_GROUP))
class-attribute
instance-attribute
¶
Command type. Always CommandOptionType.SUB_COMMAND_GROUP for this class.
SlashCommandFamilyPart
dataclass
¶
Bases: Part
flowchart TD
scurrypy.api.commands.slash.SlashCommandFamilyPart[SlashCommandFamilyPart]
scurrypy.core.part.Part[Part]
scurrypy.core.part.Part --> scurrypy.api.commands.slash.SlashCommandFamilyPart
click scurrypy.api.commands.slash.SlashCommandFamilyPart href "" "scurrypy.api.commands.slash.SlashCommandFamilyPart"
click scurrypy.core.part.Part href "" "scurrypy.core.part.Part"
Represents fields for creating a slash command with subcommands.
name: RequiredPartField[str] = None
class-attribute
instance-attribute
¶
Name of the command.
description: OptionalPartField[str] = None
class-attribute
instance-attribute
¶
Description of the command.
options: RequiredPartField[list[SubcommandGroupPart | SubcommandPart]] = None
class-attribute
instance-attribute
¶
Subcommands or subcommand groups for the command.
SlashCommandPart
dataclass
¶
Bases: Part
flowchart TD
scurrypy.api.commands.slash.SlashCommandPart[SlashCommandPart]
scurrypy.core.part.Part[Part]
scurrypy.core.part.Part --> scurrypy.api.commands.slash.SlashCommandPart
click scurrypy.api.commands.slash.SlashCommandPart href "" "scurrypy.api.commands.slash.SlashCommandPart"
click scurrypy.core.part.Part href "" "scurrypy.core.part.Part"
Represents fields for creating a slash command.
name: RequiredPartField[str] = None
class-attribute
instance-attribute
¶
Name of the command.
description: OptionalPartField[str] = None
class-attribute
instance-attribute
¶
Description of the command.
options: OptionalPartField[list[CommandOptionPart]] = 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.