admin

package
v3.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BanPlayerUsage = "Usage: $ban <player> <reason>"

BanPlayerUsage comment...

View Source
var ConfigCommandUsage = "Usage: $config save | load | get <path> | set <path> <value>"

ModCommandUsage ...

View Source
var KickPlayerUsage = "Usage: $kick <player> <reason>"

KickPlayerUsage comment...

View Source
var ModCommandUsage = "Usage: $mod purge | (add|remove|enable|disable) <modnames>"

ModCommandUsage ...

View Source
var ServerCommandUsage = "Usage: $server [stop|start|restart]"
View Source
var UnbanPlayerUsage = "Usage $unban <player>"

UnbanPlayerUsage comment...

Functions

func BanPlayer

func BanPlayer(s *discordgo.Session, args string)

BanPlayer bans a player on the server.

func ConfigCommand

func ConfigCommand(s *discordgo.Session, args string)

ModCommand returns the list of mods running on the server.

func KickPlayer

func KickPlayer(s *discordgo.Session, args string)

KickPlayer kicks a player from the server.

func ModCommand

func ModCommand(s *discordgo.Session, args string)

ModCommand returns the list of mods running on the server.

func SaveServer

func SaveServer(s *discordgo.Session, args string)

SaveServer executes the save command on the server.

func ServerCommand

func ServerCommand(s *discordgo.Session, args string)

func UnbanPlayer

func UnbanPlayer(s *discordgo.Session, args string)

UnbanPlayer unbans a player on the server.

Types

type Mod

type Mod struct {
	Name    string `json:"name"`
	Enabled bool   `json:"enabled"`
	Version string `json:"version,omitempty"`
}

Mod is a struct containing info about a mod.

type ModJSON

type ModJSON struct {
	Mods []Mod `json:"mods"`
}

ModJSON is struct containing a slice of Mod.

Jump to

Keyboard shortcuts

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