added github command

This commit is contained in:
DutchEllie 2021-05-18 12:56:16 +02:00
parent 322087f6a1
commit 3c1463011e
2 changed files with 10 additions and 0 deletions

View File

@ -35,6 +35,8 @@ func (app *application) messageCreate(s *discordgo.Session, m *discordgo.Message
app.sendTuesday(s, m)
case "wednesday":
app.sendWednesday(s, m)
case "github", "source":
app.sendGithub(s, m)
/* --- Bot commands for words --- */
/* --- Bot commands, but only admins --- */
case "addword":

View File

@ -100,6 +100,14 @@ func (app *application) sendWednesday(s *discordgo.Session, m *discordgo.Message
}
}
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 {
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