add wednesday
This commit is contained in:
parent
6d79e8d9a0
commit
322087f6a1
|
@ -33,6 +33,8 @@ func (app *application) messageCreate(s *discordgo.Session, m *discordgo.Message
|
||||||
app.sendNigelGif(s, m)
|
app.sendNigelGif(s, m)
|
||||||
case "tuesday":
|
case "tuesday":
|
||||||
app.sendTuesday(s, m)
|
app.sendTuesday(s, m)
|
||||||
|
case "wednesday":
|
||||||
|
app.sendWednesday(s, m)
|
||||||
/* --- Bot commands for words --- */
|
/* --- Bot commands for words --- */
|
||||||
/* --- Bot commands, but only admins --- */
|
/* --- Bot commands, but only admins --- */
|
||||||
case "addword":
|
case "addword":
|
||||||
|
|
|
@ -76,6 +76,30 @@ func (app *application) sendTuesday(s *discordgo.Session, m *discordgo.MessageCr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (app *application) sendWednesday(s *discordgo.Session, m *discordgo.MessageCreate) {
|
||||||
|
if time.Now().Weekday().String() != "Wednesday" {
|
||||||
|
_, err := s.ChannelMessageSend(m.ChannelID, "This command only works on wednesdays")
|
||||||
|
if err != nil {
|
||||||
|
app.errorLog.Print(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_, month, day := time.Now().Date()
|
||||||
|
if month.String() == "May" && day == 18 {
|
||||||
|
_, err := s.ChannelMessageSend(m.ChannelID, "https://www.youtube.com/watch?v=z21HOwUk5oM")
|
||||||
|
if err != nil {
|
||||||
|
app.errorLog.Print(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, err := s.ChannelMessageSend(m.ChannelID, "https://www.youtube.com/watch?v=du-TY1GUFGk")
|
||||||
|
if err != nil {
|
||||||
|
app.errorLog.Print(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (app *application) findTrigger(s *discordgo.Session, m *discordgo.MessageCreate) {
|
func (app *application) findTrigger(s *discordgo.Session, m *discordgo.MessageCreate) {
|
||||||
/* Finding for every word in the allBadWords map of string slices
|
/* Finding for every word in the allBadWords map of string slices
|
||||||
Check if the message contains that word
|
Check if the message contains that word
|
||||||
|
|
Loading…
Reference in New Issue