diff --git a/commands.go b/commands.go index b989ce8..9ec193b 100644 --- a/commands.go +++ b/commands.go @@ -15,6 +15,7 @@ type CommandFunction func(s *discordgo.Session, m *discordgo.MessageCreate) func InitCommands(s *discordgo.Session) { s.AddHandler(commandHandler("greet", greetCommand)) s.AddHandler(commandHandler("dadjoke", dadJokeCommand)) + s.AddHandler(commandHandler("hibub", hiBubCommand)) } 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) 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) +}