bot

package
v0.0.0-...-81345b5 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2023 License: MIT Imports: 6 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 {
	ID        string
	Session   *discordgo.Session
	GPTClient gpt.GPTClient // Use the GPTClient interface
	Commands  map[string]commands.Command
}

Bot represents the state of the Discord bot.

func NewBot

func NewBot() *Bot

NewBot initializes a new Bot instance.

func (*Bot) LoadCommands

func (b *Bot) LoadCommands()

LoadCommands initializes and maps the commands for the bot.

func (*Bot) OnMessageReceived

func (b *Bot) OnMessageReceived(s *discordgo.Session, m *discordgo.MessageCreate)

OnMessageReceived is called when a message is received.

func (*Bot) Start

func (b *Bot) Start()

Start begins the bot's operation.

Jump to

Keyboard shortcuts

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