alias

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package alias imeplements user customizable aliases for commands. The user can set their own aliases, per channel, or system wide.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New creates a new alias handler and registers the alias command with the the Mux, to permit users to manage their aliases.

func Register

func Register()

Register installs this handler on bot.DefaultBot

Types

type Alias

type Alias struct {
	// contains filtered or unexported fields
}

Alias implements alias support for use by Mux

func (*Alias) Describe

func (h *Alias) Describe() (string, string)

Describe returns the name and description of the handler.

func (*Alias) Help

func (h *Alias) Help(w io.Writer) error

Help implements a command.Help hanndler for the alias handler

func (*Alias) ProcessMessage

func (h *Alias) ProcessMessage(ctx context.Context, w hugot.ResponseWriter, m *hugot.Message) error

ProcessMessage attempets to execute the message using the Mux, if that fails, it looks for aliases in the properties of the message. If a suitable alias is found, that is executed. It also adds an alias manager command for managing the set of aliases

Jump to

Keyboard shortcuts

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