# Packages
No description provided by the author
# Functions
AddAdmin A function that allows admins to be added, but not removed.
AddChildCommand Adds a child command to the bot.
AddCommand Add a command to the bot.
AddDGOHandler This provides a way for commands to pass handler functions through to discordgo, and have them added properly during bot startup.
AddSlashCommand Adds a slash command to the bot Allows for separation between normal commands and slash commands.
AddSlashCommands Defaults to adding Global slash commands Currently hard coded to guild commands for testing.
AddWorker Given a function that is passed through, append it to the list of worker functions.
CleanId Given a string, attempt to remove all numbers from it Additionally, ensure it is at least 17 characters in length This is a way of "cleaning" a Discord ping into a valid snowflake string.
No description provided by the author
CreateCommandInfo Creates a pointer to a CommandInfo.
CreateComponentFields Returns a slice of a Message Component, containing a singular ActionsRow.
No description provided by the author
CreateEmbed Create an embed.
CreateField Create message field to use for an embed.
CreateRawCmdInfo Creates a pointer to a CommandInfo.
EnsureLetters Given a string, ensure it contains only letters This is useful for stripping numbers from mute durations, and possibly other things.
EnsureNumbers Given a string, ensure it contains only numbers This is useful for stripping letters and formatting characters from user/role pings.
No description provided by the author
ExtractCommand Given a message, attempt to extract a commands trigger and command arguments out of it If there is no prefix, try using a bot mention as the prefix.
No description provided by the author
GetCommands Provide a way to read commands without making it possible to modify their functions.
GetUser Given a user ID, get that user's object (global to Discord, not in a guild).
IsAdmin Allow commands to check if a user is an admin or not Since botAdmins is a boolean map, if they are not in the map, false is the default.
IsCommand Check if a given string is a command registered to the core bot.
NewResponse Create a response object for a guild, which starts off as an empty Embed which will have fields added to it The response starts with some "auditing" information The embed will be finalized in .Send().
ParseArguments Version two of the argument parser.
ParseInteractionArgs Parses Interaction args.
ParseInteractionArgsR Parses interaction args recursively.
ParseTime Parses time strings.
RemoveGuildSlashCommands Removes all guild slash commands.
RemoveItem Remove an item from a slice by value.
RemoveItems Removes items from a slice by index.
No description provided by the author
SendErrorReport Send an error report as a DM to all of the registered bot administrators.
SetInitProvider Sets the init provider.
SetPresence Sets the gateway field for bot presence.
SetTestingId A function that allows a single id to be added, but not removed.
SetToken A function that allows a single token to be added, but not removed.
Start the bot.
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ColorFailure The color to use for response embeds reporting failure.
ColorSuccess The color to use for response embeds reporting success.
No description provided by the author
Guilds A map that stores the data for all known guilds We store pointers to the guilds, so that only one guild object is maintained across all contexts Otherwise, there will be information desync.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MessageState Tells discordgo the amount of messages to cache.
No description provided by the author
No description provided by the author
Session The Discord session, made public so commands can use it.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
ArgInfo Describes a CommandInfo argument.
Command The definition of a command, which is that command's information, along with the function it will run.
CommandArg Describes what a cmd ctx will receive.
CommandInfo The definition of a command's info.
Context This is a context of a single command invocation This gives the command function access to all the information it might need.
Guild The definition of a guild, which is simply its ID and Info.
GuildInfo This is all the settings and data that needs to be stored about a single guild.
GuildProvider Type that holds functions that can be easily modified to support a wide range of storage types.
Response The Response type, can be build and sent to a given guild.
ResponseComponents Stores the components for response allows for functions to add data.
# Type aliases
ArgTypeGuards A way to get type safety in AddArg.
ArgTypes A way to get type safety in AddArg.
Arguments Type of the arguments field in the command ctx.
BotFunction This type defines the functions that are called when commands are triggered Contexts are also passed as pointers, so they are not re-allocated when passed through.
ChildCommand Defines how child commands are stored.
Group Defines different "groups" of commands for ordering in a help command.