discord_styled.slash

The slash package help us to handle slash commands structure

@option decorator

Creates option used for creating slash command.

@option(name: str,
        description: str,
        type: Union[int, type],
        required: int = True,
        choices: list = [])
1
2
3
4
5

name - Name of the option.
description - Description of the option.
type - Type of the option.

  • Choices:
    • 3 - String
    • 4 - Integer
    • 5 - Boolean
    • 6 - User
    • 7 - Channel
    • 8 - Role
    • 9 - Mentionable (Users and roles)
    • 10 - Number

required - Whether this option is required.
choices - Choices of the option. Can be empty.