public Task <IReadOnlyList <RestMessage> > GetMessagesAsync(int limit = 100, RetrievalDirection direction = RetrievalDirection.Before, Snowflake?startFromId = null, RestRequestOptions options = null) => Client.GetMessagesAsync(Id, limit, direction, startFromId, options);
public Task <RestMessage> GetMessageAsync(Snowflake messageId, RestRequestOptions options = null) => Client.GetMessageAsync(Id, messageId, options);
public Task <RestUserMessage> SendMessageAsync(IEnumerable <LocalAttachment> attachments, string content = null, bool isTTS = false, LocalEmbed embed = null, LocalMentions mentions = null, RestRequestOptions options = null) => Client.SendMessageAsync(Id, attachments, content, isTTS, embed, mentions, options);
public RestRequestEnumerable <RestMessage> GetMessagesEnumerable(int limit, RetrievalDirection direction = RetrievalDirection.Before, Snowflake?startFromId = null, RestRequestOptions options = null) => Client.GetMessagesEnumerable(Id, limit, direction, startFromId, options);
public Task DeleteMessageAsync(Snowflake messageId, RestRequestOptions options = null) => Client.DeleteMessageAsync(Id, messageId, options);
Task IDeletable.DeleteAsync(RestRequestOptions options) => RevokeAsync(options);
public static Task RemoveReactionAsync(IMessage message, Snowflake memberId, IEmoji emoji, RestRequestOptions options) { if (emoji == null) { throw new ArgumentNullException(nameof(emoji)); } return(message.Client.RemoveMemberReactionAsync(message.ChannelId, message.Id, memberId, emoji, options)); }
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);
public Task DeleteAsync(RestRequestOptions options = null) => Client.DeleteRoleAsync(GuildId, Id, options);
public async Task ModifyAsync(Action <ModifyRoleProperties> action, RestRequestOptions options = null) { var model = await Client.InternalModifyRoleAsync(GuildId, Id, action, options).ConfigureAwait(false); Update(model); }
public Task UnpinAsync(RestRequestOptions options = null) => Client.UnpinMessageAsync(ChannelId, Id, options);
public async Task <IReadOnlyList <RestVoiceRegion> > GetVoiceRegionsAsync(RestRequestOptions options = null) { var models = await ApiClient.ListVoiceRegionsAsync(options).ConfigureAwait(false); return(models.ToReadOnlyList(this, (x, @this) => new RestVoiceRegion(@this, x))); }
public async Task <string> GetGatewayUrlAsync(RestRequestOptions options = null) { var model = await ApiClient.GetGatewayAsync(options).ConfigureAwait(false); return(model.Url); }
public Task RemoveOwnReactionAsync(Snowflake messageId, IEmoji emoji, RestRequestOptions options = null) => Client.RemoveOwnReactionAsync(Id, messageId, emoji, options);
public Task DeleteOverwriteAsync(Snowflake targetId, RestRequestOptions options = null) => Client.DeleteOverwriteAsync(Id, targetId, options);
public RestRequestEnumerable <RestUser> GetReactionsEnumerable(Snowflake messageId, IEmoji emoji, int limit, Snowflake?startFromId = null, RestRequestOptions options = null) => Client.GetReactionsEnumerable(Id, messageId, emoji, limit, startFromId, options);
public Task DeleteAsync(RestRequestOptions options = null) => Client.DeleteOrCloseChannelAsync(Id);
public Task <RestUserMessage> ModifyMessageAsync(Snowflake messageId, Action <ModifyMessageProperties> action, RestRequestOptions options = null) => Client.ModifyMessageAsync(Id, messageId, action, options);
public Task AddOrModifyOverwriteAsync(LocalOverwrite overwrite, RestRequestOptions options = null) => Client.AddOrModifyOverwriteAsync(Id, overwrite, options);
public Task <IReadOnlyList <RestUserMessage> > GetPinnedMessagesAsync(RestRequestOptions options = null) => Client.GetPinnedMessagesAsync(Id, options);
/// <summary> /// Revokes this <see cref="RestBan"/>, unbanning the <see cref="User"/>. /// </summary> /// <param name="options"></param> public Task RevokeAsync(RestRequestOptions options = null) => Client.UnbanMemberAsync(GuildId, User.Id, options);