shrouter

package
v0.0.0-...-9edbf76 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: MIT Imports: 2 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 {
	*discordgo.Session
	*Router
}

func NewBot

func NewBot() *Bot

type CommandHandler

type CommandHandler func(*Context, *discordgo.Session, *discordgo.Interaction)

type Context

type Context struct {
	Vars map[string]interface{}
	// contains filtered or unexported fields
}

type Router

type Router struct {
	Commands        []*discordgo.ApplicationCommand
	CommandHandlers map[string]CommandHandler
}

func NewRouter

func NewRouter() *Router

func (*Router) AddCommands

func (r *Router) AddCommands(cmds ...*discordgo.ApplicationCommand)

func (*Router) Start

func (r *Router) Start(s *discordgo.Session, v map[string]interface{})

Jump to

Keyboard shortcuts

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