From 810d971567ef2b9317b4c837622e06398bc505e4 Mon Sep 17 00:00:00 2001 From: Layla Date: Thu, 27 Oct 2022 03:36:56 +0000 Subject: [PATCH] Ignore not important stuff --- app/bot.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/bot.go b/app/bot.go index 793d252..d8e6023 100644 --- a/app/bot.go +++ b/app/bot.go @@ -106,6 +106,10 @@ func (app *Bot) onReady(s *discordgo.Session, r *discordgo.Ready) { } func (app *Bot) onEventCreate(s *discordgo.Session, r *discordgo.GuildScheduledEventCreate) { + if r.GuildID != app.guildID { + return + } + event := &Event{} event.Name = r.Name event.OrganizerID = r.CreatorID @@ -135,6 +139,9 @@ func (app *Bot) onEventCreate(s *discordgo.Session, r *discordgo.GuildScheduledE } func (app *Bot) onEventDelete(s *discordgo.Session, r *discordgo.GuildScheduledEventDelete) { + if r.GuildID != app.guildID { + return + } // Create Event Object event := &Event{} @@ -156,6 +163,9 @@ func (app *Bot) onEventDelete(s *discordgo.Session, r *discordgo.GuildScheduledE } func (app *Bot) onEventUpdate(s *discordgo.Session, r *discordgo.GuildScheduledEventUpdate) { + if r.GuildID != app.guildID { + return + } // Create Event Object event := &Event{} @@ -176,6 +186,7 @@ func (app *Bot) onEventUpdate(s *discordgo.Session, r *discordgo.GuildScheduledE } func (app *Bot) onEventComplete(s *discordgo.Session, event *Event) { + channel_name := event.GetChannelName() if app.archiveCategoryID != "" {