admin

package module
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: MIT Imports: 6 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

plug-admin

A Snart Plug with basic administration features.

Documentation

Overview

Package admin provides a Snart plug with basic administration features.

Index

Constants

This section is empty.

Variables

View Source
var ErrRestart = errors.New("restart")

ErrRestart occurs when a restart is requested.

View Source
var Plug = plug.Plug(&Admin{})

Plug is a pre-allocated Admin, to follow the same pattern as when loading with plugin.

Functions

This section is empty.

Types

type Admin

type Admin struct {
	plug.Base
}

Admin is a Plug with basic administration features.

func (*Admin) Config added in v0.5.2

func (a *Admin) Config(t *route.Trigger) error

Config is a command for managing configuration.

func (*Admin) PlugRoute added in v0.5.2

func (a *Admin) PlugRoute(r *route.Route)

PlugRoute adds the Admin's routes to the given Route.

func (*Admin) Restart

func (a *Admin) Restart(t *route.Trigger) error

Restart is a command that restarts the Bot.

func (*Admin) String

func (a *Admin) String() string

type ConfigFlags added in v0.5.2

type ConfigFlags struct {
	Guild discord.GuildID `default:"0" usage:"guild id to edit config for"`
}

ConfigFlags are the flags for Config.

Jump to

Keyboard shortcuts

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