Update comments for Godoc

master
DustyP 6 years ago
parent 48ba9bcd44
commit 47051350b9

@ -10,29 +10,45 @@ 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 {
// Function which returns a list of strings which are to be used as prefixes
Prefixes PrefixesFunc Prefixes PrefixesFunc
// Array of string IDs of the owners of the bot (for use with commands that are owner only)
Owners []string Owners []string
// Status Manager which will handle updating the status of the bot
StatusManager StatusManager StatusManager StatusManager
// Function to call when there is an error with a command (not used currently)
OnErrorFunc OnErrorFunc OnErrorFunc OnErrorFunc
// Map of the command names to the pointer of the command to call
Commands map[string]*Command Commands map[string]*Command
// Should we ignore bots when processing commands
IgnoreBots bool 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 that will be used for the status
Values []string 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 {
// The name of the command
Name string Name string
// Aliases the command can be called with
Aliases []string Aliases []string
// Simple description for use with the help command
Description string Description string
// Is the command owner only
OwnerOnly bool OwnerOnly bool
// Is the command hidden (should it show up in help)
Hidden bool Hidden bool
// Permissions that are required for the command to function
RequiredPermissions Permission RequiredPermissions Permission
// Function to invoke when command is called
Invoke CommandInvokeFunc Invoke CommandInvokeFunc
} }

Loading…
Cancel
Save