From a4af39b523f51710a63d16b29c0b196d781a61ec Mon Sep 17 00:00:00 2001 From: RageCage64 Date: Sat, 15 Jan 2022 19:25:41 -0500 Subject: [PATCH 1/2] Em made this command! --- commands.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/commands.go b/commands.go index b989ce8..76f7643 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,9 @@ 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?" + s.ChannelMessageSend(m.ChannelID, hibub) +} From 9bff860a54dcf33b2606da1e9c3a32da37bcbde2 Mon Sep 17 00:00:00 2001 From: RageCage64 Date: Sat, 15 Jan 2022 19:31:11 -0500 Subject: [PATCH 2/2] fix formatting in em's command --- commands.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands.go b/commands.go index 76f7643..9ec193b 100644 --- a/commands.go +++ b/commands.go @@ -65,6 +65,7 @@ func dadJokeCommand(s *discordgo.Session, m *discordgo.MessageCreate) { func hiBubCommand(s *discordgo.Session, m *discordgo.MessageCreate) { user := m.Author - hibub := "Hi " + user.Username + "it's Bub from the Hubbub, how are you?" + hibub := "Hi " + user.Username + " it's Bub from the Hubbub, how are you?" + log.Println(hibub) s.ChannelMessageSend(m.ChannelID, hibub) }