add tuesday

This commit is contained in:
DutchEllie 2021-05-18 12:37:26 +02:00
parent 26097ea9d1
commit 3e4f3efa12
2 changed files with 17 additions and 0 deletions

View File

@ -31,6 +31,8 @@ func (app *application) messageCreate(s *discordgo.Session, m *discordgo.Message
app.sendCringe(s, m)
case "gif":
app.sendNigelGif(s, m)
case "tuesday":
app.sendTuesday(s, m)
/* --- Bot commands for words --- */
/* --- Bot commands, but only admins --- */
case "addword":

View File

@ -61,6 +61,21 @@ func (app *application) sendNigelGif(s *discordgo.Session, m *discordgo.MessageC
}
}
func (app *application) sendTuesday(s *discordgo.Session, m *discordgo.MessageCreate) {
if time.Now().Weekday().String() != "Tuesday" {
_, err := s.ChannelMessageSend(m.ChannelID, "This command only works on tuesdays")
if err != nil {
app.errorLog.Print(err)
return
}
}
_, err := s.ChannelMessageSend(m.ChannelID, "https://cdn.nicecock.eu/TBT.webm")
if err != nil {
app.errorLog.Print(err)
return
}
}
func (app *application) findTrigger(s *discordgo.Session, m *discordgo.MessageCreate) {
/* Finding for every word in the allBadWords map of string slices
Check if the message contains that word