bot

package
v0.0.0-...-7af6a51 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: MIT Imports: 12 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 client responsible for updating Max's role and occasionally banning her.

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 begins necessary goroutines and connects to Discord.

type Option

type Option func(*Bot)

Option configures a bot.

func WithChannelID

func WithChannelID(cid discord.ChannelID) Option

WithChannelID sets a bot's channel ID.

func WithGuildID

func WithGuildID(gid discord.GuildID) Option

WithGuildID sets a bot's guild ID.

func WithLogger

func WithLogger(l *zap.Logger) Option

WithLogger sets a bot's logger.

func WithRoleColor

func WithRoleColor(c discord.Color) Option

WithRoleColor sets a bot's role color.

func WithRoleID

func WithRoleID(rid discord.RoleID) Option

WithRoleID sets a bot's role ID.

func WithUserID

func WithUserID(uid discord.UserID) Option

WithUserID sets a bot's user ID.

Jump to

Keyboard shortcuts

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