Documentation
¶
Overview ¶
Package discord exposes the Discord (Gateway) constructor and the raw-event and session accessors for botbooter. Import it for a Discord bot; a Discord-only binary pulls in discordgo but never slack-go or go-telegram.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New creates a Discord bot that connects via the Gateway. It returns an error only if discordgo rejects the token at construction; an invalid or revoked token otherwise surfaces when Run or Connect opens the gateway session.
func RawEvent ¶
func RawEvent(m *botbooter.Message) (*discordgo.MessageCreate, bool)
RawEvent returns the raw Discord message-create event carried on m, reporting whether m originated from Discord.
func RawReaction ¶ added in v0.4.0
func RawReaction(r *botbooter.Reaction) (*discordgo.MessageReactionAdd, bool)
RawReaction returns the raw Discord reaction-add event carried on r, reporting whether r originated from Discord. Its Emoji field holds the platform's original values (bare Name, ID) behind the "<:name:id>" markup a custom emoji gets in r.Emoji.
Types ¶
This section is empty.