bot

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

type Bot struct {
	// contains filtered or unexported fields
}

Bot is a Discord bot that interacts with the scrote.gay database.

func New

func New(token string, opts ...Option) (*Bot, error)

New creates a new bot.

func (*Bot) Start

func (b *Bot) Start(ctx context.Context) error

Start opens a connection to Discord.

type Option

type Option func(*Bot)

Option configures a bot.

func WithComicsDir

func WithComicsDir(cd string) Option

WithComicsDir sets a bot's directory for comics.

func WithComicsEmoji

func WithComicsEmoji(id discord.EmojiID) Option

WithComicsEmoji sets a bot's comic upload emoji.

func WithDB

func WithDB(db *sql.DB) Option

WithDB sets a bot's database client.

func WithDebug

func WithDebug() Option

WithDebug enables debug mode on a bot.

func WithGuildID

func WithGuildID(sf discord.GuildID) Option

WithGuildID sets the bot's guild ID for commands.

Jump to

Keyboard shortcuts

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