Skip to content

Commit

Permalink
add demo button -> not tested
Browse files Browse the repository at this point in the history
  • Loading branch information
maribowman committed Dec 17, 2023
1 parent 0aa8d38 commit 9f86232
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/service/grocery_bot.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ func (bot *GroceryBot) MessageEvent(session *discordgo.Session, message *discord
resultTable = bot.previousShoppingListTable
}

if _, err := s.ApplicationCommandCreate(*AppID, *GuildID, &discordgo.ApplicationCommand{
Name: "buttons",
Description: "Test the buttons if you got courage",
}); err != nil {
log.Error().Err(err).Msg("Cannot create button command")
}

// TODO edit instead of new message
if _, err := session.ChannelMessageSend(message.ChannelID, resultTable); err != nil {
log.Error().Err(err).Msg("could not send message")
Expand Down

0 comments on commit 9f86232

Please sign in to comment.