added new tool function

This commit is contained in:
2024-03-05 14:38:28 +01:00
parent c90e2d59fc
commit 34b0f95464
6 changed files with 24 additions and 98 deletions

10
tool.go
View File

@@ -65,3 +65,13 @@ func hexToDecimal(hexColor string) int {
}
return int(decimal)
}
func respondEphemeral(s *discordgo.Session, interaction *discordgo.Interaction, content string) {
s.InteractionRespond(interaction, &discordgo.InteractionResponse{
Type: discordgo.InteractionResponseChannelMessageWithSource,
Data: &discordgo.InteractionResponseData{
Content: content,
Flags: discordgo.MessageFlagsEphemeral,
},
})
}