Em made this command!

main
RageCage64 3 years ago
parent eed6f3c7f3
commit a4af39b523

@ -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)
}

Loading…
Cancel
Save