package
5.1.1+incompatible
Repository: https://github.com/gsmcwhirter/discord-bot-lib.git
Documentation: pkg.go.dev

# Functions

ChannelMentionString generates a string that discord interprets as a mention of a channel.
ForceUserAccountMention converts a user mention into an account mention (if it is not already an account mention).
ForceUserNicknameMention converts a user mention into a nickname mention (if it is not already a nickname mention).
IsChannelMention determines if a string is a mention of a channel.
IsRoleMention determines if a string is a mention of a server role.
IsUserMention determines if a string is a mention of a user (either by nickname or account name).
NewCommandHandler creates a new CommandHandler from the given parser NOTE: the parser's settings must match the Options.CaseSensitive value.
NewMessageHandler wraps a MessageHandlerFunc into a MessageHandler.
NewSimpleMessage creates a new Message object.
NewWithContents clones a given message object but substitutes the Contents() with the provided string.
RoleMentionString generates a string that discord interprets as a mention of a server role.
UserMentionString generates a string that discord interprets as a mention of a user by their server nickname.

# Variables

ErrMissingHandler is the error thrown when an event handler cannot be found.
ErrNotUserMention is the error returned when a user mention string is required but not provided.

# Structs

CommandHandler is a dispatcher for commands.
EmbedField is part of an EmbedResponse that represents an embed field.
EmbedResponse is a Response that is intended to present text in an discord embed box, including embed fields.
Options provides a way to specify configurable values when creating a CommandHandler - Placeholder is the string to be used to represent the "command" - PreCommand is a string representing the state of commands prior to this one - NoHelpOnUnknownCommands can be set to true to NOT display a help message when a command isn't known - HelpOnEmptyCommands can be set to true to display a help message when no command is provided - CaseSensitive can se set to true to make command recognition case-sensitive.
SimpleEmbedResponse is a Response that is intended to present text in an discord embed box but not include any embed fields.
SimpleResponse is a Response that is intended to present plain text.

# Interfaces

Message is the api for a message that a command handler will respond to.
MessageHandler is the api of a message handler.
Response is the interface that should be returned from a command handler.

# Type aliases

MessageHandlerFunc is the api of a function that handles messages.