diff --git a/structs.go b/structs.go index b2db109..f1b3177 100644 --- a/structs.go +++ b/structs.go @@ -10,30 +10,46 @@ import "github.com/bwmarrin/discordgo" // A CommandManager which will hold the info and structures required for handling command messages type CommandManager struct { - Prefixes PrefixesFunc - Owners []string - StatusManager StatusManager - OnErrorFunc OnErrorFunc - Commands map[string]*Command - IgnoreBots bool + // Function which returns a list of strings which are to be used as prefixes + Prefixes PrefixesFunc + // Array of string IDs of the owners of the bot (for use with commands that are owner only) + Owners []string + // Status Manager which will handle updating the status of the bot + StatusManager StatusManager + // Function to call when there is an error with a command (not used currently) + OnErrorFunc OnErrorFunc + // Map of the command names to the pointer of the command to call + Commands map[string]*Command + // Should we ignore bots when processing commands + IgnoreBots bool + // Do we need to check permissions for commands (not used currently) CheckPermissions bool } // A StatusManager which will update the status of the bot type StatusManager struct { - Values []string + // Values that will be used for the status + Values []string + // How often is the status updated Interval string } // A Command with all of the info specific to this command type Command struct { - Name string - Aliases []string - Description string - OwnerOnly bool - Hidden bool + // The name of the command + Name string + // Aliases the command can be called with + Aliases []string + // Simple description for use with the help command + Description string + // Is the command owner only + OwnerOnly bool + // Is the command hidden (should it show up in help) + Hidden bool + // Permissions that are required for the command to function RequiredPermissions Permission - Invoke CommandInvokeFunc + // Function to invoke when command is called + Invoke CommandInvokeFunc } // Context that a command needs to run