Update comments for Godoc

master
DustyP 6 years ago
parent 48ba9bcd44
commit 47051350b9

@ -10,30 +10,46 @@ import "github.com/bwmarrin/discordgo"
// A CommandManager which will hold the info and structures required for handling command messages // A CommandManager which will hold the info and structures required for handling command messages
type CommandManager struct { type CommandManager struct {
Prefixes PrefixesFunc // Function which returns a list of strings which are to be used as prefixes
Owners []string Prefixes PrefixesFunc
StatusManager StatusManager // Array of string IDs of the owners of the bot (for use with commands that are owner only)
OnErrorFunc OnErrorFunc Owners []string
Commands map[string]*Command // Status Manager which will handle updating the status of the bot
IgnoreBots bool 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 CheckPermissions bool
} }
// A StatusManager which will update the status of the bot // A StatusManager which will update the status of the bot
type StatusManager struct { type StatusManager struct {
Values []string // Values that will be used for the status
Values []string
// How often is the status updated
Interval string Interval string
} }
// A Command with all of the info specific to this command // A Command with all of the info specific to this command
type Command struct { type Command struct {
Name string // The name of the command
Aliases []string Name string
Description string // Aliases the command can be called with
OwnerOnly bool Aliases []string
Hidden bool // 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 RequiredPermissions Permission
Invoke CommandInvokeFunc // Function to invoke when command is called
Invoke CommandInvokeFunc
} }
// Context that a command needs to run // Context that a command needs to run

Loading…
Cancel
Save