Documentation ¶
Index ¶
- Constants
- Variables
- func IsMessagewithPrefix(evt *event.Event, prefix string) bool
- func RemoveWord(slice []string, s int) []string
- func SendFormattedMessage(he HandlerEssentials, evt *event.Event, handlerName, msg string) bool
- func SendMessage(he HandlerEssentials, evt *event.Event, handlerName, msg string) bool
- func SetCommandPrefix(prefix string)
- func SplitAnswer(words []string, RequiredCount, OptionalCount int, vars ...*string) error
- func StripPrefix(message, prefix string) string
- func StripPrefixandGetContent(message, prefix string) ([]string, error)
- type BergEventHandleFunction
- type BergEventHandler
- type HandlerEssentials
- type SubHandlerSet
- type SubHandlers
Constants ¶
View Source
const WrongArguments = "Falsche Anzahl an Argumenten, benutze %v help für Hilfe."
Variables ¶
View Source
var CommandPrefix = "!"
Functions ¶
func RemoveWord ¶
func SendFormattedMessage ¶
func SendFormattedMessage(he HandlerEssentials, evt *event.Event, handlerName, msg string) bool
func SendMessage ¶
func SendMessage(he HandlerEssentials, evt *event.Event, handlerName, msg string) bool
func SetCommandPrefix ¶
func SetCommandPrefix(prefix string)
func SplitAnswer ¶
func StripPrefix ¶
Types ¶
type BergEventHandleFunction ¶
type BergEventHandler ¶
type BergEventHandler interface { Handle(he HandlerEssentials, source mautrix.EventSource, evt *event.Event) bool GetName() string GetCommand() string Prime(he HandlerEssentials) error }
type HandlerEssentials ¶
type SubHandlerSet ¶
type SubHandlerSet struct { F BergEventHandleFunction //Function H string //Helptext U string //USagetext NV int //Needed Variable Count OV int //Optional Variable Count }
type SubHandlers ¶
type SubHandlers map[string]SubHandlerSet
func (*SubHandlers) Handle ¶
func (s *SubHandlers) Handle(command string, handlerName string, he HandlerEssentials, evt *event.Event) bool
Click to show internal directories.
Click to hide internal directories.