commands

package
v0.0.0-...-6da4afb Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteCommand

func ExecuteCommand(config *types.Config, update tgbotapi.Update, Commands map[string]Command, bot *tgbotapi.BotAPI)

ExecuteCommand executes command

func Init

func Init() map[string]Command

Init loads all commands

Types

type Command

type Command struct {
	Function    func(config *types.Config, bot *tgbotapi.BotAPI, args []string, PassString bool, update tgbotapi.Update) (err error)
	Description string
	PassString  bool
	Admin       bool
}

Command structure to represent commands

Jump to

Keyboard shortcuts

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