state

package
v1.10.3 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package state contains important variables.

Index

Constants

View Source
const AdminOnly = "This command is only available to system administrators!"

AdminOnly is the message sent when an unprivileged user invokes an admin-only request.

View Source
const ErrorOccurred = "Something went wrong and I am very confused! Please try again!"

ErrorOccurred is the message sent when the event handler catches an error.

View Source
const FeatureDisabled = "This feature is currently disabled."

FeatureDisabled is the message sent when a feature requested by the user is disabled.

View Source
const GuildOnly = "This command can only be issued from a guild."

GuildOnly is the message sent when a guild-only command is issued in private.

View Source
const InvalidArgument = "Invalid argument."

InvalidArgument is the message sent when the user passes an invalid argument.

View Source
const KappaColor = 0x3492c4

KappaColor is the primary color of the kappa.

View Source
const LackingPermission = "Lacking permission to perform specified action."

LackingPermission is the message sent when lacking permission for an operation.

View Source
const MissingUser = "Specified user does not exist."

MissingUser is the message sent when a specified user does not exist.

View Source
const OperatorOnly = "This command is only available to operators!"

OperatorOnly is the message sent when an unprivileged user invokes an operator-only request.

View Source
const PermissionDenied = "You are not allowed to issue this command!"

PermissionDenied is the message sent when the user invokes a request without sufficient permission.

Variables

View Source
var (
	ExitCode     = make(chan int)
	DiscordReady = make(chan bool)
)

Channels

View Source
var Administrator *discordgo.User

Administrator represents the Discord user of the administrator of the instance.

View Source
var Application *discordgo.Application

Application is the Discord application of the instance.

View Source
var InviteURL string

InviteURL contains the invite URL of the bot.

View Source
var Operator []*discordgo.User

Operator represents the slice of Discord users of the operators of the instance.

View Source
var RawSession, _ = discordgo.New()

RawSession is the raw session with Discord.

View Source
var ShardSessions []*discordgo.Session

ShardSessions is the slice of sessions of each shard.

Functions

func Revision added in v1.0.1

func Revision() string

Revision returns the git revision of Nitori.

func Uptime added in v1.5.6

func Uptime() time.Duration

Uptime returns the duration the instance has been online.

func Version

func Version() string

Version returns the version of Nitori.

Types

type SystemStats added in v1.6.9

type SystemStats struct {
	Process struct {
		PID          int
		Uptime       time.Duration
		NumGoroutine int
		DBSize       int64
	}
	Platform struct {
		GoVersion string
		GOOS      string
		GOARCH    string
		GOROOT    string
	}
	Discord struct {
		Intents  int
		Sharding bool
		Shards   int
		Guilds   int
	}
	Mem struct {
		Allocated string
		Total     string
		Sys       string
		Lookups   uint64
		Mallocs   uint64
		Frees     uint64
	}
	Heap struct {
		Alloc    string
		Sys      string
		Idle     string
		Inuse    string
		Released string
		Objects  uint64
	}
	GC struct {
		NextGC       string
		LastGC       string
		PauseTotalNs string
		PauseNs      string
		NumGC        uint32
	}
	Misc struct {
		StackInuse  string
		StackSys    string
		MSpanInuse  string
		MSpanSys    string
		MCacheInuse string
		MCacheSys   string
		GCSys       string
		BuckHashSys string
		OtherSys    string
	}
}

SystemStats represents stats of the instance.

func Stats added in v1.6.9

func Stats() SystemStats

Stats returns a populated SystemStats.

Jump to

Keyboard shortcuts

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