Exemplo n.º 1
0
        /// <summary>
        /// Removes a reaction from this message.
        /// <para>Requires <see cref="DiscordPermission.ManageMessages"/>.</para>
        /// </summary>
        /// <param name="user">The user who added the reacted.</param>
        /// <param name="reactionEmoji"></param>
        /// <exception cref="ArgumentNullException"></exception>
        /// <exception cref="DiscordHttpApiException"></exception>
        public Task DeleteUserReaction(DiscordUser user, DiscordReactionEmoji reactionEmoji)
        {
            if (user == null)
            {
                throw new ArgumentNullException(nameof(user));
            }

            return(http.DeleteUserReaction(ChannelId, Id, user.Id, reactionEmoji));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Gets all users who reacted with the specified emoji to this message.
 /// </summary>
 /// <exception cref="ArgumentNullException"></exception>
 /// <exception cref="DiscordHttpApiException"></exception>
 public Task <IReadOnlyList <DiscordUser> > GetReactions(DiscordReactionEmoji reactionEmoji)
 {
     return(http.GetReactions(ChannelId, Id, reactionEmoji));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Removes a reaction from this message.
 /// <para>Requires <see cref="DiscordPermission.ManageMessages"/>.</para>
 /// </summary>
 /// <param name="userId">The ID of the user who added the reacted.</param>
 /// <param name="reactionEmoji"></param>
 /// <exception cref="ArgumentNullException"></exception>
 /// <exception cref="DiscordHttpApiException"></exception>
 public Task DeleteUserReaction(Snowflake userId, DiscordReactionEmoji reactionEmoji)
 {
     return(http.DeleteUserReaction(ChannelId, Id, userId, reactionEmoji));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Removes a reaction from this message added from the current bot.
 /// </summary>
 /// <exception cref="ArgumentNullException"></exception>
 /// <exception cref="DiscordHttpApiException"></exception>
 public Task DeleteOwnReaction(DiscordReactionEmoji reactionEmoji)
 {
     return(http.DeleteOwnReaction(ChannelId, Id, reactionEmoji));
 }
Exemplo n.º 5
0
 /// <summary>
 /// Adds a reaction to this message.
 /// <para>Requires <see cref="DiscordPermission.ReadMessageHistory"/>.</para>
 /// <para>Requires <see cref="DiscordPermission.AddReactions"/> if nobody else has reacted to the message prior.</para>
 /// </summary>
 /// <exception cref="ArgumentNullException"></exception>
 /// <exception cref="DiscordHttpApiException"></exception>
 public Task CreateReaction(DiscordReactionEmoji emoji)
 {
     return(http.CreateReaction(ChannelId, Id, emoji));
 }