commands

package
v0.0.0-...-4647870 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAdmin

func CheckAdmin(ID string) bool

CheckAdmin checks if the user attempting to run an admin command is an admin

func RegisterCommands

func RegisterCommands()

RegisterCommands registers the commands on start up.

func RunCommand

func RunCommand(name string, s *discordgo.Session, m *discordgo.MessageCreate)

RunCommand runs a specified command.

Types

type Command

type Command struct {
	Name    string
	Command func(s *discordgo.Session, m *discordgo.MessageCreate)
	Admin   bool
}

Command is a struct containing fields that hold command information.

type Commands

type Commands struct {
	CommandList []Command
}

Commands is a struct containing a slice of Command.

var CL Commands

CL is a Commands interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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