bot

package
v0.0.0-...-4c1801a Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AboutMessageCommand

func AboutMessageCommand(s *discordgo.Session, m *discordgo.MessageCreate)

AboutMessageCommand takes a created message and returns an About embed message

func AboutSlashCommand

func AboutSlashCommand(s *discordgo.Session, i *discordgo.InteractionCreate)

AboutSlashCommand returns an About embed message for a slash command

func OnGuildChannelCreateHandler

func OnGuildChannelCreateHandler(b *Bot) func(*discordgo.Session, *discordgo.ChannelCreate)

OnGuildChannelCreateHandler is another specific use-case handler function that invalidates the bot's channel ID cache if the channel in the cache is deleted

Types

type Bot

type Bot struct {
	Start           time.Time
	MessageCommands []*chat.MessageCommand
	SlashCommands   []*chat.SlashCommand

	*discordgo.Session
	// contains filtered or unexported fields
}

Bot encompasses a DiscordGo Bot

func NewBot

func NewBot(token string) (b *Bot, err error)

NewBot creates a new Bot

func (*Bot) RegisterSlashCommands

func (b *Bot) RegisterSlashCommands() error

func (*Bot) Self

func (b *Bot) Self() (*discordgo.User, error)

Self returns the User struct associated with the bot user

func (*Bot) String

func (b *Bot) String() string

Jump to

Keyboard shortcuts

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