Documentation ¶
Overview ¶
Package discordbot provides helper functionality around discordgo, useful for creating bots.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
A Bot is a Discord Bot.
func Connect ¶
Connect connects to the Discord API as a bot, opens a session, and blocks until a Ready event is received or the Context expires.
func (*Bot) OnEmojiAdded ¶
OnEmojiAdded calls cb when the specified emoji is added on any message. The emoji is identified by the value returned by discordgo.Eomji.APIName(); an empty string matches all emoji.
func (*Bot) OnEmojiRemoved ¶
OnEmojiRemoved calls cb when the specified emoji is removed from any message. See OnEmojiAdded() for details on emoji names.
func (*Bot) SetErrHandler ¶
SetErrHandler sets the function that is called when an error occurs while processing a callback.
type Reaction ¶
type Reaction struct { *discord.MessageReaction Giver, Receiver *discord.User }
A Reaction contains information about a reaction by a Giver on a message created by the Receiver of the reaction.
type ReactionAdded ¶
type ReactionAdded struct {
Reaction
}
ReactionAdded embeds a Reaction to signal that it was added.
type ReactionRemoved ¶
type ReactionRemoved struct {
Reaction
}
ReactionRemoved embeds a Reaction to signal that it was removed.