Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CommandCollection = make(plugins.Collection[*WafferCommand])
Functions ¶
func Add ¶
func Add(cmd *WafferCommand) error
func AddList ¶
func AddList(commands ...*WafferCommand)
Types ¶
type CommandData ¶
type CommandData struct { // Name of the command. Name string // Command description Description string // Command arguments Arguments []string // Required arguments RequiredArgs uint // Command category Category string // Command permissions Permissions *CommandPermissions // Application command Slash *discordgo.ApplicationCommand }
CommandData is a struct that contains some usefull information for a command.
type CommandPermissions ¶
type CommandPermissions struct { AllowDM bool OwnerOnly bool Require discordgo.PermissionOverwriteType }
type WafferCommand ¶
type WafferCommand struct { Plugin *plugins.Plugin[*discordgo.MessageCreate] // If the plugin is a command sets some usefull information. Data *CommandData }
func Get ¶
func Get(name string) (*WafferCommand, error)
Get returns a command from the CommandCollection if it exists.
func (*WafferCommand) HelpEmbed ¶
func (cmd *WafferCommand) HelpEmbed() (*discordgo.MessageEmbed, error)
Click to show internal directories.
Click to hide internal directories.