Beispiel #1
0
 public Task <IReadOnlyList <RestUser> > GetReactionsAsync(Snowflake messageId, IEmoji emoji, int limit = 100, Snowflake?startFromId = null, RestRequestOptions options = null)
 => Client.GetReactionsAsync(Id, messageId, emoji, limit, startFromId, options);
Beispiel #2
0
 public static string MessageJumpLink(Snowflake?guildId, Snowflake channelId, Snowflake messageId) => guildId != null
     ? $"https://discord.com/channels/{guildId}/{channelId}/{messageId}"
     : $"https://discord.com/channels/@me/{channelId}/{messageId}";
Beispiel #3
0
 public Task <RestGuildEmoji> ModifyEmojiAsync(Snowflake emojiId, Action <ModifyGuildEmojiProperties> action, RestRequestOptions options = null)
 => Client.ModifyGuildEmojiAsync(Id, emojiId, action, options);
Beispiel #4
0
 public int CompareTo(Snowflake other)
 => RawValue.CompareTo(other);
Beispiel #5
0
 /// <inheritdoc/>
 public override bool TryRemoveMessages(Snowflake channelId, out IEnumerable <CachedUserMessage> messages)
 {
     messages = null;
     return(false);
 }
Beispiel #6
0
 public Task UnpinMessageAsync(Snowflake messageId, RestRequestOptions options = null)
 => Client.UnpinMessageAsync(Id, messageId, options);
Beispiel #7
0
 public bool Equals(Snowflake other)
 => RawValue == other.RawValue;
Beispiel #8
0
 public Task <RestBan> GetBanAsync(Snowflake userId, RestRequestOptions options = null)
 => Client.GetBanAsync(Id, userId, options);
Beispiel #9
0
 public Task BanMemberAsync(Snowflake memberId, string reason = null, int?deleteMessageDays = null, RestRequestOptions options = null)
 => Client.BanMemberAsync(Id, memberId, reason, deleteMessageDays, options);
Beispiel #10
0
 public Task RevokeRoleAsync(Snowflake memberId, Snowflake roleId, RestRequestOptions options = null)
 => Client.RevokeRoleAsync(Id, memberId, roleId, options);
Beispiel #11
0
 public Task KickMemberAsync(Snowflake memberId, RestRequestOptions options = null)
 => Client.KickMemberAsync(Id, memberId, options);
Beispiel #12
0
 public Task ModifyMemberAsync(Snowflake memberId, Action <ModifyMemberProperties> action, RestRequestOptions options = null)
 => Client.ModifyMemberAsync(Id, memberId, action, options);
Beispiel #13
0
 public Task <RestMember> GetMemberAsync(Snowflake memberId, RestRequestOptions options = null)
 => Client.GetMemberAsync(Id, memberId, options);
Beispiel #14
0
 public Task DeleteEmojiAsync(Snowflake emojiId, RestRequestOptions options = null)
 => Client.DeleteGuildEmojiAsync(Id, emojiId, options);
Beispiel #15
0
 public Task <RestUserMessage> ModifyMessageAsync(Snowflake messageId, Action <ModifyMessageProperties> action, RestRequestOptions options = null)
 => Client.ModifyMessageAsync(Id, messageId, action, options);
Beispiel #16
0
 public Task UnbanMemberAsync(Snowflake userId, RestRequestOptions options = null)
 => Client.UnbanMemberAsync(Id, userId, options);
Beispiel #17
0
        public async Task PinMessageAsync(Snowflake messageId, RestRequestOptions options = null)
        {
            await Client.PinMessageAsync(Id, messageId, options).ConfigureAwait(false);

            LastPinTimestamp = DateTimeOffset.UtcNow;
        }
Beispiel #18
0
 public Task <RestRole> ModifyRoleAsync(Snowflake roleId, Action <ModifyRoleProperties> action, RestRequestOptions options = null)
 => Client.ModifyRoleAsync(Id, roleId, action, options);
 public Task DeleteOverwriteAsync(Snowflake targetId, RestRequestOptions options = null)
 => Client.DeleteOverwriteAsync(Id, targetId, options);
Beispiel #20
0
 public CachedUserMessage GetMessage(Snowflake id)
 => Client.GetMessage(Id, id);
Beispiel #21
0
 public static bool TryParse(string value, out Snowflake result)
 => TryParse(value.AsSpan(), out result);
Beispiel #22
0
 public Task <RestMessage> GetMessageAsync(Snowflake messageId, RestRequestOptions options = null)
 => Client.GetMessageAsync(Id, messageId, options);
Beispiel #23
0
 /// <inheritdoc/>
 public override bool TryRemoveMessage(Snowflake channelId, Snowflake messageId, out CachedUserMessage message)
 {
     message = null;
     return(false);
 }
Beispiel #24
0
 public Task RemoveOwnReactionAsync(Snowflake messageId, IEmoji emoji, RestRequestOptions options = null)
 => Client.RemoveOwnReactionAsync(Id, messageId, emoji, options);
Beispiel #25
0
 public Task RevokeRoleAsync(Snowflake roleId, RestRequestOptions options = null)
 => Client.RevokeRoleAsync(Guild.Id, Id, roleId, options);
Beispiel #26
0
 public RestRequestEnumerable <RestUser> GetReactionsEnumerable(Snowflake messageId, IEmoji emoji, int limit, Snowflake?startFromId = null, RestRequestOptions options = null)
 => Client.GetReactionsEnumerable(Id, messageId, emoji, limit, startFromId, options);
Beispiel #27
0
 public static string MentionUser(Snowflake id, bool hasNick = false)
 => hasNick ? $"<@!{id}>" : $"<@{id}>";
Beispiel #28
0
 public Task <RestGuildEmoji> GetEmojiAsync(Snowflake emojiId, RestRequestOptions options = null)
 => Client.GetGuildEmojiAsync(Id, emojiId, options);