Documentation ¶
Overview ¶
Package state contains important variables.
Index ¶
Constants ¶
const AdminOnly = "This command is only available to system administrators!"
AdminOnly is the message sent when an unprivileged user invokes an admin-only request.
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.
const FeatureDisabled = "This feature is currently disabled."
FeatureDisabled is the message sent when a feature requested by the user is disabled.
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.
const InvalidArgument = "Invalid argument."
InvalidArgument is the message sent when the user passes an invalid argument.
const KappaColor = 0x3492c4
KappaColor is the primary color of the kappa.
const LackingPermission = "Lacking permission to perform specified action."
LackingPermission is the message sent when lacking permission for an operation.
const MissingUser = "Specified user does not exist."
MissingUser is the message sent when a specified user does not exist.
const OperatorOnly = "This command is only available to operators!"
OperatorOnly is the message sent when an unprivileged user invokes an operator-only request.
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 ¶
var ( ExitCode = make(chan int) DiscordReady = make(chan bool) )
Channels
var Administrator *discordgo.User
Administrator represents the Discord user of the administrator of the instance.
var Application *discordgo.Application
Application is the Discord application of the instance.
var InviteURL string
InviteURL contains the invite URL of the bot.
var Operator []*discordgo.User
Operator represents the slice of Discord users of the operators of the instance.
var RawSession, _ = discordgo.New()
RawSession is the raw session with Discord.
var ShardSessions []*discordgo.Session
ShardSessions is the slice of sessions of each shard.
Functions ¶
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.