commands

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package commands handles the command definitions and handler for the bot.

Index

Constants

This section is empty.

Variables

View Source
var CommandCreate = &command.Definition{
	Name:        "event",
	Description: "Manage events",
	Handler:     Create,
	Options: []*discordgo.ApplicationCommandOption{
		{
			Type:        discordgo.ApplicationCommandOptionString,
			Name:        "create",
			Description: "Create a new event for a specific category",
			Required:    true,
			Choices:     amenities.Choices(),
		},
	},
}

CommandCreate defines the create command.

Functions

func Create

func Create(event command.Event) error

Create command handler.

Types

type Joke added in v0.0.2

type Joke struct {
	Action *action.Joke
}

Joke handler and definition.

func (Joke) Definition added in v0.0.2

func (j Joke) Definition() *command.Definition

Definition for the joke command.

func (Joke) Handle added in v0.0.2

func (j Joke) Handle(event command.Event) error

Handle the joke command.

type Refresh added in v0.0.3

type Refresh struct {
	Settings config.CaC
	Items    []Refresher
}

Refresh handler and definition.

func (Refresh) Definition added in v0.0.3

func (r Refresh) Definition() *command.Definition

Definition for the refresh command.

func (Refresh) Handle added in v0.0.3

func (r Refresh) Handle(event command.Event) error

Handle the refresh command.

type Refresher added in v0.0.3

type Refresher interface {
	Refresh() error
}

A Refresher can be refreshed by the refresh command.

type RoomService added in v0.0.2

type RoomService struct {
	Channel string
	Action  *action.Menu
}

RoomService handler and definition.

func (RoomService) Definition added in v0.0.2

func (r RoomService) Definition() *command.Definition

Definition for the room service command.

func (RoomService) Handle added in v0.0.2

func (r RoomService) Handle(event command.Event) error

Handle the room-service command.

Jump to

Keyboard shortcuts

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