How to use slash commands to make the bot post a "Only you can see this" message in a channel #1138
-
This was an experimental feature that had been added to the api, and it can be accessed by flag 64 as mentioned in the link below, please check. The solution in the link is pretty much sorted and done in discord js, just wanted to know if we can replicate this in DIscordGo. I've gone through the slash commands example and hadn't seen any provision to create command with a flag. Thank you. https://www.reddit.com/r/Discordjs/comments/l56oet/only_you_can_see_this_bot_message/ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The answer is yes, you can replicate this in DiscordGo! Additionally I would recommend going through the documentation, since examples might not showcase all the new features. |
Beta Was this translation helpful? Give feedback.
The answer is yes, you can replicate this in DiscordGo!
While it's not shown in the example,
InteractionResponse
has aFlags
field, also you can useint(discordgo.MessageFlagsEphemeral)
(currently you must convert flag to an integer, I think we'll fix that in the next release) instead of64
.Additionally I would recommend going through the documentation, since examples might not showcase all the new features.