add back some missing functions
This commit is contained in:
parent
2d5447820f
commit
cafc1b7e64
|
|
@ -1,6 +1,3 @@
|
||||||
uberbot
|
# ignore IDE related files
|
||||||
.env
|
|
||||||
guilds/*.json
|
|
||||||
.vscode
|
|
||||||
.idea
|
.idea
|
||||||
.DS_Store
|
.vscode
|
||||||
|
|
|
||||||
22
core.go
22
core.go
|
|
@ -51,6 +51,16 @@ var ColorSuccess = 0x55F485
|
||||||
// The color to use for response embeds reporting failure
|
// The color to use for response embeds reporting failure
|
||||||
var ColorFailure = 0xF45555
|
var ColorFailure = 0xF45555
|
||||||
|
|
||||||
|
// BotPresence
|
||||||
|
var botPresence discordgo.GatewayStatusUpdate
|
||||||
|
|
||||||
|
// SetPresence
|
||||||
|
// Sets the gateway field for bot presence
|
||||||
|
func SetPresence(presence discordgo.GatewayStatusUpdate) {
|
||||||
|
botPresence = presence
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// AddAdmin
|
// AddAdmin
|
||||||
// A function that allows admins to be added, but not removed
|
// A function that allows admins to be added, but not removed
|
||||||
func AddAdmin(userId string) {
|
func AddAdmin(userId string) {
|
||||||
|
|
@ -102,7 +112,7 @@ func dgoLog(msgL, caller int, format string, a ...interface{}) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start uberbot!
|
// Start the bot.
|
||||||
func Start() {
|
func Start() {
|
||||||
discordgo.Logger = dgoLog
|
discordgo.Logger = dgoLog
|
||||||
// Load all the guilds
|
// Load all the guilds
|
||||||
|
|
@ -126,15 +136,7 @@ func Start() {
|
||||||
Session.SyncEvents = false
|
Session.SyncEvents = false
|
||||||
Session.Identify.Intents = discordgo.MakeIntent(discordgo.IntentsAll)
|
Session.Identify.Intents = discordgo.MakeIntent(discordgo.IntentsAll)
|
||||||
// Set the bots status
|
// Set the bots status
|
||||||
Session.Identify.Presence = discordgo.GatewayStatusUpdate{
|
Session.Identify.Presence = botPresence
|
||||||
Game: discordgo.Activity{
|
|
||||||
Name: "Mega Man Battle Network",
|
|
||||||
Type: 3,
|
|
||||||
},
|
|
||||||
Status: "dnd",
|
|
||||||
AFK: true,
|
|
||||||
Since: 91879201,
|
|
||||||
}
|
|
||||||
// Open the session
|
// Open the session
|
||||||
log.Info("Connecting to Discord...")
|
log.Info("Connecting to Discord...")
|
||||||
err = Session.Open()
|
err = Session.Open()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue