Skip to content

Commit

Permalink
Ignore not important stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
yeslayla committed Oct 27, 2022
1 parent 7c21e20 commit 810d971
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/bot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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{}
Expand All @@ -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{}
Expand All @@ -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 != "" {
Expand Down

0 comments on commit 810d971

Please sign in to comment.