Added pepe friday

This commit is contained in:
DutchEllie 2021-12-17 15:09:23 +01:00
parent 95c1d2cca5
commit a7f2016ae0
2 changed files with 18 additions and 0 deletions

View File

@ -53,6 +53,8 @@ func (app *application) messageCreate(s *discordgo.Session, m *discordgo.Message
app.sendTuesday(s, m)
case "wednesday":
app.sendWednesday(s, m)
case "friday":
app.sendFriday(s, m)
case "github", "source":
app.sendGithub(s, m)
case "peski", "rotterdam":

View File

@ -115,6 +115,22 @@ func (app *application) sendWednesday(s *discordgo.Session, m *discordgo.Message
}
}
func (app *application) sendFriday(s *discordgo.Session, m *discordgo.MessageCreate) {
if time.Now().Weekday().String() != "Friday" {
_, err := s.ChannelMessageSend(m.ChannelID, "This command only works on fridays")
if err != nil {
app.errorLog.Print(err)
return
}
return
}
_, err := s.ChannelMessageSend(m.ChannelID, "https://www.youtube.com/watch?v=kfVsfOSbJY0")
if err != nil {
app.errorLog.Print(err)
return
}
}
func (app *application) sendGithub(s *discordgo.Session, m *discordgo.MessageCreate) {
_, err := s.ChannelMessageSend(m.ChannelID, "My code is hosted publicly over at https://github.com/DutchEllie/pepebot")
if err != nil {