Merge branch 'main' of git.ragecage64.com:RageCage64/bub-the-bot into main

main
RageCage64 3 years ago
commit 29f4657988

@ -15,6 +15,7 @@ type CommandFunction func(s *discordgo.Session, m *discordgo.MessageCreate)
func InitCommands(s *discordgo.Session) { func InitCommands(s *discordgo.Session) {
s.AddHandler(commandHandler("greet", greetCommand)) s.AddHandler(commandHandler("greet", greetCommand))
s.AddHandler(commandHandler("dadjoke", dadJokeCommand)) s.AddHandler(commandHandler("dadjoke", dadJokeCommand))
s.AddHandler(commandHandler("hibub", hiBubCommand))
} }
func commandHandler(commandName string, handler CommandFunction) func(s *discordgo.Session, m *discordgo.MessageCreate) { func commandHandler(commandName string, handler CommandFunction) func(s *discordgo.Session, m *discordgo.MessageCreate) {
@ -61,3 +62,10 @@ func dadJokeCommand(s *discordgo.Session, m *discordgo.MessageCreate) {
log.Println(joke) log.Println(joke)
s.ChannelMessageSend(m.ChannelID, joke) s.ChannelMessageSend(m.ChannelID, joke)
} }
func hiBubCommand(s *discordgo.Session, m *discordgo.MessageCreate) {
user := m.Author
hibub := "Hi " + user.Username + " it's Bub from the Hubbub, how are you?"
log.Println(hibub)
s.ChannelMessageSend(m.ChannelID, hibub)
}

Loading…
Cancel
Save