Пример #1
0
 /// <summary>
 /// Deletes another user's reaction.
 /// This endpoint requires the 'MANAGE_MESSAGES' permission to be present on the current user.
 /// Valid emoji formats are the unicode emoji character '😀' or for custom emoji format must be &lt;emojiName:emojiId&gt;
 /// See <a href="https://discord.com/developers/docs/resources/channel#delete-user-reaction">Delete User Reaction</a>
 /// </summary>
 /// <param name="client">Client to use</param>
 /// <param name="emoji">Emoji to delete</param>
 /// <param name="userId">User ID who add the reaction</param>
 /// <param name="callback">Callback once the action is completed</param>
 /// <param name="error">Callback when an error occurs with error information</param>
 public void DeleteUserReaction(DiscordClient client, DiscordEmoji emoji, Snowflake userId, Action callback = null, Action <RestError> error = null)
 {
     if (!userId.IsValid())
     {
         throw new InvalidSnowflakeException(nameof(userId));
     }
     DeleteUserReaction(client, emoji.ToDataString(), userId, callback, error);
 }
Пример #2
0
 /// <summary>
 /// Deletes all the reactions for a given emoji on a message.
 /// This endpoint requires the MANAGE_MESSAGES permission to be present on the current user.
 /// Valid emoji formats are the unicode emoji character '😀' or for custom emoji format must be &lt;emojiName:emojiId&gt;
 /// See <a href="https://discord.com/developers/docs/resources/channel#delete-all-reactions-for-emoji">Delete All Reactions for Emoji</a>
 /// </summary>
 /// <param name="client">Client to use</param>
 /// <param name="emoji">Emoji to delete all reactions for</param>
 /// <param name="callback">Callback once the action is completed</param>
 /// <param name="error">Callback when an error occurs with error information</param>
 public void DeleteAllReactionsForEmoji(DiscordClient client, DiscordEmoji emoji, Action callback = null, Action <RestError> error = null)
 {
     DeleteAllReactionsForEmoji(client, emoji.ToDataString(), callback, error);
 }
Пример #3
0
 /// <summary>
 /// Get a list of users that reacted with this emoji
 /// Valid emoji formats are the unicode emoji character '😀' or for custom emoji format must be &lt;emojiName:emojiId&gt;
 /// See <a href="https://discord.com/developers/docs/resources/channel#get-reactions">Get Reactions</a>
 /// </summary>
 /// <param name="client">Client to use</param>
 /// <param name="emoji">Emoji to get the list for</param>
 /// <param name="callback">Callback with a list of users who reacted</param>
 /// <param name="error">Callback when an error occurs with error information</param>
 public void GetReactions(DiscordClient client, DiscordEmoji emoji, Action <List <DiscordUser> > callback = null, Action <RestError> error = null)
 {
     GetReactions(client, emoji.ToDataString(), callback, error);
 }
Пример #4
0
 /// <summary>
 /// Create a reaction for the message.
 /// This endpoint requires the 'READ_MESSAGE_HISTORY' permission to be present on the current user.
 /// Additionally, if nobody else has reacted to the message using this emoji, this endpoint requires the 'ADD_REACTIONS' permission to be present on the current user.
 /// Valid emoji formats are the unicode emoji character '😀' or for custom emoji format must be &lt;emojiName:emojiId&gt;
 /// See <a href="https://discord.com/developers/docs/resources/channel#create-reaction">Create Reaction</a>
 /// </summary>
 /// <param name="client">Client to use</param>
 /// <param name="emoji">Emoji to react with.</param>
 /// <param name="callback">Callback once the action is completed</param>
 /// <param name="error">Callback when an error occurs with error information</param>
 public void CreateReaction(DiscordClient client, DiscordEmoji emoji, Action callback = null, Action <RestError> error = null)
 {
     CreateReaction(client, emoji.ToDataString(), callback, error);
 }
Пример #5
0
 /// <summary>
 /// Deletes another user's reaction.
 /// This endpoint requires the 'MANAGE_MESSAGES' permission to be present on the current user.
 /// Valid emoji formats are the unicode emoji character '😀' or for custom emoji format must be &lt;emojiName:emojiId&gt;
 /// See <a href="https://discord.com/developers/docs/resources/channel#delete-user-reaction">Delete User Reaction</a>
 /// </summary>
 /// <param name="client">Client to use</param>
 /// <param name="emoji">Emoji to delete</param>
 /// <param name="userId">User ID who add the reaction</param>
 /// <param name="callback">Callback once the action is completed</param>
 /// <param name="error">Callback when an error occurs with error information</param>
 public void DeleteUserReaction(DiscordClient client, DiscordEmoji emoji, Snowflake userId, Action callback = null, Action <RestError> error = null)
 {
     DeleteUserReaction(client, emoji.ToDataString(), userId, callback, error);
 }