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.

IEmote.Inclusion.md 883 B

7 years ago
1234567891011121314151617181920212223242526
  1. The sample below sends a message and adds an @Discord.Emoji and a custom
  2. @Discord.Emote to the message.
  3. ```cs
  4. public async Task SendAndReactAsync(ISocketMessageChannel channel)
  5. {
  6. var message = await channel.SendMessageAsync("I am a message.");
  7. // Creates a Unicode-based emoji based on the Unicode string.
  8. // This is effectively the same as new Emoji("💕").
  9. var heartEmoji = new Emoji("\U0001f495");
  10. // Reacts to the message with the Emoji.
  11. await message.AddReactionAsync(heartEmoji);
  12. // Parses a custom emote based on the provided Discord emote format.
  13. // Please note that this does not guarantee the existence of
  14. // the emote.
  15. var emote = Emote.Parse("<:thonkang:282745590985523200>");
  16. // Reacts to the message with the Emote.
  17. await message.AddReactionAsync(emote);
  18. }
  19. ```
  20. #### Result
  21. ![React Example](images/react-example.png)