You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

05-responding-ephemerally.md 845 B

3 years ago
3 years ago
3 years ago
1234567891011121314151617181920212223
  1. ---
  2. uid: Guides.SlashCommands.Ephemeral
  3. title: Ephemeral Responses
  4. ---
  5. # Responding ephemerally
  6. What is an ephemeral response? Basically, only the user who executed the command can see the result of it, this is pretty simple to implement.
  7. > [!NOTE]
  8. > You don't have to run arg.DeferAsync() to capture the interaction, you can use arg.RespondAsync() with a message to capture it, this also follows the ephemeral rule.
  9. When responding with either `FollowupAsync` or `RespondAsync` you can pass in an `ephemeral` property. When setting it to true it will respond ephemerally, false and it will respond non-ephemerally.
  10. Let's use this in our list role command.
  11. ```cs
  12. await command.RespondAsync(embed: embedBuiler.Build(), ephemeral: true);
  13. ```
  14. Running the command now only shows the message to us!
  15. ![ephemeral command](images/ephemeral1.png)