bot

package
v0.0.0-...-e14f300 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: GPL-3.0 Imports: 9 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 {
	Session                *discordgo.Session
	Commands               []CommandEntry
	CommandPrefix          string
	CommandSuccessReaction string
	CommandFailReaction    string
}

func New

func New(token string) (*Bot, error)

func (*Bot) HelpCommand

func (bot *Bot) HelpCommand(s *discordgo.Session, m *discordgo.Message, args string) error

func (*Bot) Run

func (bot *Bot) Run() error

type Command

type Command func(*discordgo.Session, *discordgo.Message, string) error

type CommandEntry

type CommandEntry struct {
	Command         Command
	Aliases         []string // first name is considered main
	Description     string
	ArgsDescription string
}

Jump to

Keyboard shortcuts

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