add back some missing functions

This commit is contained in:
vel 2021-08-16 22:09:55 -07:00
parent 2d5447820f
commit cafc1b7e64
Signed by: velvox
GPG Key ID: 1C8200C1D689CEF5
2 changed files with 14 additions and 15 deletions

7
.gitignore vendored
View File

@ -1,6 +1,3 @@
uberbot
.env
guilds/*.json
.vscode
# ignore IDE related files
.idea
.DS_Store
.vscode

22
core.go
View File

@ -51,6 +51,16 @@ var ColorSuccess = 0x55F485
// The color to use for response embeds reporting failure
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
// A function that allows admins to be added, but not removed
func AddAdmin(userId string) {
@ -102,7 +112,7 @@ func dgoLog(msgL, caller int, format string, a ...interface{}) {
}
}
// Start uberbot!
// Start the bot.
func Start() {
discordgo.Logger = dgoLog
// Load all the guilds
@ -126,15 +136,7 @@ func Start() {
Session.SyncEvents = false
Session.Identify.Intents = discordgo.MakeIntent(discordgo.IntentsAll)
// Set the bots status
Session.Identify.Presence = discordgo.GatewayStatusUpdate{
Game: discordgo.Activity{
Name: "Mega Man Battle Network",
Type: 3,
},
Status: "dnd",
AFK: true,
Since: 91879201,
}
Session.Identify.Presence = botPresence
// Open the session
log.Info("Connecting to Discord...")
err = Session.Open()