feat: Add Discord Guild ID flag to server configuration

This commit is contained in:
Frederico Santos 2024-08-29 23:12:32 +01:00
parent 46b1279852
commit ad469a5c61

View File

@ -57,6 +57,7 @@ func main() {
gameurl := flag.String("gameurl", "https://pokerogue.net", "URL for game server") gameurl := flag.String("gameurl", "https://pokerogue.net", "URL for game server")
discordbottoken := flag.String("discordbottoken", "dbt", "Discord Bot Token") discordbottoken := flag.String("discordbottoken", "dbt", "Discord Bot Token")
discordguildid := flag.String("discordguildid", "dgid", "Discord Guild ID")
flag.Parse() flag.Parse()
@ -70,7 +71,7 @@ func main() {
account.GoogleClientSecret = *googlesecretid account.GoogleClientSecret = *googlesecretid
account.GoogleCallbackURL = *callbackurl + "/auth/google/callback" account.GoogleCallbackURL = *callbackurl + "/auth/google/callback"
account.DiscordSession, _ = discordgo.New("Bot " + *discordbottoken) account.DiscordSession, _ = discordgo.New("Bot " + *discordbottoken)
account.DiscordGuildId = *discordguildid
// register gob types // register gob types
gob.Register([]interface{}{}) gob.Register([]interface{}{})
gob.Register(map[string]interface{}{}) gob.Register(map[string]interface{}{})