added monday
This commit is contained in:
parent
c9e77f463e
commit
18aed75a59
|
@ -47,6 +47,8 @@ func (app *application) messageCreate(s *discordgo.Session, m *discordgo.Message
|
|||
app.sendCringe(s, m)
|
||||
case "gif":
|
||||
app.sendNigelGif(s, m)
|
||||
case "monday":
|
||||
app.sendMonday(s, m)
|
||||
case "tuesday":
|
||||
app.sendTuesday(s, m)
|
||||
case "wednesday":
|
||||
|
|
|
@ -69,6 +69,22 @@ func (app *application) sendNigelGif(s *discordgo.Session, m *discordgo.MessageC
|
|||
}
|
||||
}
|
||||
|
||||
func (app *application) sendMonday(s *discordgo.Session, m *discordgo.MessageCreate) {
|
||||
if time.Now().Weekday().String() != "Monday" {
|
||||
_, err := s.ChannelMessageSend(m.ChannelID, "This command only works on mondays")
|
||||
if err != nil {
|
||||
app.errorLog.Print(err)
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
_, err := s.ChannelMessageSend(m.ChannelID, "https://www.youtube.com/watch?v=EkALyaMjoXw")
|
||||
if err != nil {
|
||||
app.errorLog.Print(err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
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")
|
||||
|
|
Loading…
Reference in New Issue