discord

package
v0.0.0-...-d997db9 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CommandMap map[string]BotCommand
View Source
var FunctionMap map[string]CommandHandler

Functions

func AddHandler

func AddHandler(name string, fn CommandHandler)

func CreateSession

func CreateSession() *discordgo.Session

func Run

func Run(session *discordgo.Session)

Types

type BotCommand

type BotCommand struct {
	Function string `json:"function"`
	Prefix   string `json:"prefix"`
	Name     string `json:"name"`
}

type BotCredentials

type BotCredentials struct {
	Token string `json:"discord_token"`
}

type CommandHandler

type CommandHandler func([]string)

type Commands

type Commands struct {
	Commands []BotCommand `json:"commands"`
}

Jump to

Keyboard shortcuts

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