bot

package
v0.0.0-...-1e8ae43 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeChannelCreateHandler

func MakeChannelCreateHandler(b *Bot) func(s *discordgo.Session, event *discordgo.ChannelCreate)

func MakeChannelDeleteHandler

func MakeChannelDeleteHandler(b *Bot) func(s *discordgo.Session, event *discordgo.ChannelDelete)

func MakeMessageCreateHandler

func MakeMessageCreateHandler(b *Bot) func(s *discordgo.Session, event *discordgo.MessageCreate)

Types

type Bot

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

func New

func New(logLevel slog.Level) (*Bot, error)

New creates a new bot, which has access to a discord client and an OpenAI client

func (*Bot) Start

func (b *Bot) Start() error

Start registers discord handlers and then starts the discord session

func (*Bot) Stop

func (b *Bot) Stop()

Jump to

Keyboard shortcuts

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