discord

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 3 Imported by: 0

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

func New(token string) (*botbooter.Bot, error)

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

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.

func Session

func Session(b *botbooter.Bot) *discordgo.Session

Session returns the discordgo gateway session backing b, or nil if b is not a Discord bot.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL