Made errors send ephemeral messages

This commit is contained in:
Atridad Lahiji 2024-10-22 11:49:33 -06:00
parent b00028d8e3
commit 7328a0139e
Signed by: atridad
SSH key fingerprint: SHA256:LGomp8Opq0jz+7kbwNcdfTcuaLRb5Nh0k5AchDDb438

View file

@ -81,6 +81,7 @@ func MarkovCommand(s *discordgo.Session, i *discordgo.InteractionCreate) {
Content: newMessage,
},
})
if err != nil {
log.Printf("Error responding to interaction: %v", err)
return
@ -139,6 +140,7 @@ func respondWithError(s *discordgo.Session, i *discordgo.InteractionCreate, mess
Type: discordgo.InteractionResponseChannelMessageWithSource,
Data: &discordgo.InteractionResponseData{
Content: message,
Flags: discordgo.MessageFlagsEphemeral,
},
})
if err != nil {