commands

package
v0.0.0-...-2232ac3 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindEventFrom

func FindEventFrom(props map[string]interface{}) (*discordgo.MessageCreate, error)

FindEventFrom is a function that finds Event from props

func FindSessionFrom

func FindSessionFrom(props map[string]interface{}) (*discordgo.Session, error)

FindSessionFrom is a function that finds Session from props

Types

type EchoHandler

type EchoHandler struct {
	Command       *cmdr.Command
	UseCase       echo.UseCase
	Presenter     *EchoPresenter
	HelpPresenter cmdr.CommandHelpPresenter
}

EchoHandler is a struct that implements CommandHandler interface

func (*EchoHandler) Handle

func (eh *EchoHandler) Handle(ctx *cmdr.Context)

Handle is a method that implements CommandHandler's Handle method

type EchoPresenter

type EchoPresenter struct {
	Session *discordgo.Session
	Event   *discordgo.MessageCreate
}

EchoPresenter is a struct that implements echo.Presenter interface

func (*EchoPresenter) Echo

func (p *EchoPresenter) Echo(contents string)

Echo is a method that implements echo.Presenter's Echo method

type HelpPresenter

type HelpPresenter struct{}

HelpPresenter is a struct that implements cmdr.CommandHelpPresenter interface

func (*HelpPresenter) Help

func (hp *HelpPresenter) Help(c *cmdr.Command, props map[string]interface{})

Help is a method that implements cmdr.CommandHelpPresente's Help method

Jump to

Keyboard shortcuts

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