Documentation
¶
Overview ¶
Package module provides implementations for the module abstractions found in package plugin.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalizedMeta ¶
type LocalizedMeta struct { // Name is the name of the module. // It may not contain whitespace or dots. Name string // ShortDescription is an optional short description of the module. ShortDescription *i18n.Config // LongDescription is an optional long description of the module. LongDescription *i18n.Config }
LocalizedMeta is the localized, implementation of the plugin.ModuleMeta interface.
func (LocalizedMeta) GetLongDescription ¶
func (m LocalizedMeta) GetLongDescription(l *i18n.Localizer) string
func (LocalizedMeta) GetName ¶
func (m LocalizedMeta) GetName() string
func (LocalizedMeta) GetShortDescription ¶
func (m LocalizedMeta) GetShortDescription(l *i18n.Localizer) string
type Meta ¶
type Meta struct { // Name is the name of the module. // It may not contain whitespace or dots. Name string // ShortDescription is an optional short description of the module. ShortDescription string // LongDescription is an optional long description of the module. LongDescription string }
Meta is the static, unlocalized, implementation of the plugin.ModuleMeta interface.
type Module ¶
type Module struct { plugin.ModuleMeta *bot.MiddlewareManager // contains filtered or unexported fields }
Module is an implementation of plugin.Module with support for middlewares.
func New ¶
func New(meta plugin.ModuleMeta) *Module
New creates a new *Module using the passed plugin.ModuleMeta.
func (*Module) AddCommand ¶
AddCommand adds the passed command to the module.
func (*Module) GetCommands ¶
func (*Module) GetModules ¶
Click to show internal directories.
Click to hide internal directories.