|
@@ -34,30 +34,53 @@ namespace Discord.WebSocket |
|
|
private ImmutableArray<string> _features; |
|
|
private ImmutableArray<string> _features; |
|
|
private AudioClient _audioClient; |
|
|
private AudioClient _audioClient; |
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
public string Name { get; private set; } |
|
|
public string Name { get; private set; } |
|
|
|
|
|
/// <inheritdoc /> |
|
|
public int AFKTimeout { get; private set; } |
|
|
public int AFKTimeout { get; private set; } |
|
|
|
|
|
/// <inheritdoc /> |
|
|
public bool IsEmbeddable { get; private set; } |
|
|
public bool IsEmbeddable { get; private set; } |
|
|
|
|
|
/// <inheritdoc /> |
|
|
public VerificationLevel VerificationLevel { get; private set; } |
|
|
public VerificationLevel VerificationLevel { get; private set; } |
|
|
|
|
|
/// <inheritdoc /> |
|
|
public MfaLevel MfaLevel { get; private set; } |
|
|
public MfaLevel MfaLevel { get; private set; } |
|
|
|
|
|
/// <inheritdoc /> |
|
|
public DefaultMessageNotifications DefaultMessageNotifications { get; private set; } |
|
|
public DefaultMessageNotifications DefaultMessageNotifications { get; private set; } |
|
|
|
|
|
/// <summary> Gets the number of members. </summary> |
|
|
|
|
|
/// <remark> |
|
|
|
|
|
/// The number of members is returned by Discord and is the most accurate. |
|
|
|
|
|
/// You may see discrepancy between the Users collection and this. |
|
|
|
|
|
/// </remark> |
|
|
public int MemberCount { get; internal set; } |
|
|
public int MemberCount { get; internal set; } |
|
|
|
|
|
/// <summary> Gets the number of members downloaded to the local guild cache. </summary> |
|
|
public int DownloadedMemberCount { get; private set; } |
|
|
public int DownloadedMemberCount { get; private set; } |
|
|
internal bool IsAvailable { get; private set; } |
|
|
internal bool IsAvailable { get; private set; } |
|
|
|
|
|
/// <summary> Indicates whether the client is connected to this guild. </summary> |
|
|
public bool IsConnected { get; internal set; } |
|
|
public bool IsConnected { get; internal set; } |
|
|
|
|
|
|
|
|
internal ulong? AFKChannelId { get; private set; } |
|
|
internal ulong? AFKChannelId { get; private set; } |
|
|
internal ulong? EmbedChannelId { get; private set; } |
|
|
internal ulong? EmbedChannelId { get; private set; } |
|
|
internal ulong? SystemChannelId { get; private set; } |
|
|
internal ulong? SystemChannelId { get; private set; } |
|
|
|
|
|
/// <inheritdoc /> |
|
|
public ulong OwnerId { get; private set; } |
|
|
public ulong OwnerId { get; private set; } |
|
|
|
|
|
/// <summary> Gets the user that owns this guild. </summary> |
|
|
public SocketGuildUser Owner => GetUser(OwnerId); |
|
|
public SocketGuildUser Owner => GetUser(OwnerId); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
public string VoiceRegionId { get; private set; } |
|
|
public string VoiceRegionId { get; private set; } |
|
|
|
|
|
/// <inheritdoc /> |
|
|
public string IconId { get; private set; } |
|
|
public string IconId { get; private set; } |
|
|
|
|
|
/// <inheritdoc /> |
|
|
public string SplashId { get; private set; } |
|
|
public string SplashId { get; private set; } |
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
public DateTimeOffset CreatedAt => SnowflakeUtils.FromSnowflake(Id); |
|
|
public DateTimeOffset CreatedAt => SnowflakeUtils.FromSnowflake(Id); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
public string IconUrl => CDN.GetGuildIconUrl(Id, IconId); |
|
|
public string IconUrl => CDN.GetGuildIconUrl(Id, IconId); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
public string SplashUrl => CDN.GetGuildSplashUrl(Id, SplashId); |
|
|
public string SplashUrl => CDN.GetGuildSplashUrl(Id, SplashId); |
|
|
|
|
|
/// <summary> Indicates whether the client has all the members downloaded to the local guild cache. </summary> |
|
|
public bool HasAllMembers => MemberCount == DownloadedMemberCount;// _downloaderPromise.Task.IsCompleted; |
|
|
public bool HasAllMembers => MemberCount == DownloadedMemberCount;// _downloaderPromise.Task.IsCompleted; |
|
|
|
|
|
/// <summary> Indicates whether the guild cache is synced to this guild. </summary> |
|
|
public bool IsSynced => _syncPromise.Task.IsCompleted; |
|
|
public bool IsSynced => _syncPromise.Task.IsCompleted; |
|
|
public Task SyncPromise => _syncPromise.Task; |
|
|
public Task SyncPromise => _syncPromise.Task; |
|
|
public Task DownloaderPromise => _downloaderPromise.Task; |
|
|
public Task DownloaderPromise => _downloaderPromise.Task; |
|
@@ -270,32 +293,43 @@ namespace Discord.WebSocket |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//General |
|
|
//General |
|
|
|
|
|
/// <inheritdoc /> |
|
|
public Task DeleteAsync(RequestOptions options = null) |
|
|
public Task DeleteAsync(RequestOptions options = null) |
|
|
=> GuildHelper.DeleteAsync(this, Discord, options); |
|
|
=> GuildHelper.DeleteAsync(this, Discord, options); |
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
public Task ModifyAsync(Action<GuildProperties> func, RequestOptions options = null) |
|
|
public Task ModifyAsync(Action<GuildProperties> func, RequestOptions options = null) |
|
|
=> GuildHelper.ModifyAsync(this, Discord, func, options); |
|
|
=> GuildHelper.ModifyAsync(this, Discord, func, options); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
public Task ModifyEmbedAsync(Action<GuildEmbedProperties> func, RequestOptions options = null) |
|
|
public Task ModifyEmbedAsync(Action<GuildEmbedProperties> func, RequestOptions options = null) |
|
|
=> GuildHelper.ModifyEmbedAsync(this, Discord, func, options); |
|
|
=> GuildHelper.ModifyEmbedAsync(this, Discord, func, options); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
public Task ReorderChannelsAsync(IEnumerable<ReorderChannelProperties> args, RequestOptions options = null) |
|
|
public Task ReorderChannelsAsync(IEnumerable<ReorderChannelProperties> args, RequestOptions options = null) |
|
|
=> GuildHelper.ReorderChannelsAsync(this, Discord, args, options); |
|
|
=> GuildHelper.ReorderChannelsAsync(this, Discord, args, options); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
public Task ReorderRolesAsync(IEnumerable<ReorderRoleProperties> args, RequestOptions options = null) |
|
|
public Task ReorderRolesAsync(IEnumerable<ReorderRoleProperties> args, RequestOptions options = null) |
|
|
=> GuildHelper.ReorderRolesAsync(this, Discord, args, options); |
|
|
=> GuildHelper.ReorderRolesAsync(this, Discord, args, options); |
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
public Task LeaveAsync(RequestOptions options = null) |
|
|
public Task LeaveAsync(RequestOptions options = null) |
|
|
=> GuildHelper.LeaveAsync(this, Discord, options); |
|
|
=> GuildHelper.LeaveAsync(this, Discord, options); |
|
|
|
|
|
|
|
|
//Bans |
|
|
//Bans |
|
|
|
|
|
/// <summary> Gets a collection of the banned users in this guild. </summary> |
|
|
public Task<IReadOnlyCollection<RestBan>> GetBansAsync(RequestOptions options = null) |
|
|
public Task<IReadOnlyCollection<RestBan>> GetBansAsync(RequestOptions options = null) |
|
|
=> GuildHelper.GetBansAsync(this, Discord, options); |
|
|
=> GuildHelper.GetBansAsync(this, Discord, options); |
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
public Task AddBanAsync(IUser user, int pruneDays = 0, string reason = null, RequestOptions options = null) |
|
|
public Task AddBanAsync(IUser user, int pruneDays = 0, string reason = null, RequestOptions options = null) |
|
|
=> GuildHelper.AddBanAsync(this, Discord, user.Id, pruneDays, reason, options); |
|
|
=> GuildHelper.AddBanAsync(this, Discord, user.Id, pruneDays, reason, options); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
public Task AddBanAsync(ulong userId, int pruneDays = 0, string reason = null, RequestOptions options = null) |
|
|
public Task AddBanAsync(ulong userId, int pruneDays = 0, string reason = null, RequestOptions options = null) |
|
|
=> GuildHelper.AddBanAsync(this, Discord, userId, pruneDays, reason, options); |
|
|
=> GuildHelper.AddBanAsync(this, Discord, userId, pruneDays, reason, options); |
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
public Task RemoveBanAsync(IUser user, RequestOptions options = null) |
|
|
public Task RemoveBanAsync(IUser user, RequestOptions options = null) |
|
|
=> GuildHelper.RemoveBanAsync(this, Discord, user.Id, options); |
|
|
=> GuildHelper.RemoveBanAsync(this, Discord, user.Id, options); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
public Task RemoveBanAsync(ulong userId, RequestOptions options = null) |
|
|
public Task RemoveBanAsync(ulong userId, RequestOptions options = null) |
|
|
=> GuildHelper.RemoveBanAsync(this, Discord, userId, options); |
|
|
=> GuildHelper.RemoveBanAsync(this, Discord, userId, options); |
|
|
|
|
|
|
|
@@ -441,12 +475,16 @@ namespace Discord.WebSocket |
|
|
=> GuildHelper.GetWebhooksAsync(this, Discord, options); |
|
|
=> GuildHelper.GetWebhooksAsync(this, Discord, options); |
|
|
|
|
|
|
|
|
//Emotes |
|
|
//Emotes |
|
|
|
|
|
/// <inheritdoc /> |
|
|
public Task<GuildEmote> GetEmoteAsync(ulong id, RequestOptions options = null) |
|
|
public Task<GuildEmote> GetEmoteAsync(ulong id, RequestOptions options = null) |
|
|
=> GuildHelper.GetEmoteAsync(this, Discord, id, options); |
|
|
=> GuildHelper.GetEmoteAsync(this, Discord, id, options); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
public Task<GuildEmote> CreateEmoteAsync(string name, Image image, Optional<IEnumerable<IRole>> roles = default(Optional<IEnumerable<IRole>>), RequestOptions options = null) |
|
|
public Task<GuildEmote> CreateEmoteAsync(string name, Image image, Optional<IEnumerable<IRole>> roles = default(Optional<IEnumerable<IRole>>), RequestOptions options = null) |
|
|
=> GuildHelper.CreateEmoteAsync(this, Discord, name, image, roles, options); |
|
|
=> GuildHelper.CreateEmoteAsync(this, Discord, name, image, roles, options); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
public Task<GuildEmote> ModifyEmoteAsync(GuildEmote emote, Action<EmoteProperties> func, RequestOptions options = null) |
|
|
public Task<GuildEmote> ModifyEmoteAsync(GuildEmote emote, Action<EmoteProperties> func, RequestOptions options = null) |
|
|
=> GuildHelper.ModifyEmoteAsync(this, Discord, emote.Id, func, options); |
|
|
=> GuildHelper.ModifyEmoteAsync(this, Discord, emote.Id, func, options); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
public Task DeleteEmoteAsync(GuildEmote emote, RequestOptions options = null) |
|
|
public Task DeleteEmoteAsync(GuildEmote emote, RequestOptions options = null) |
|
|
=> GuildHelper.DeleteEmoteAsync(this, Discord, emote.Id, options); |
|
|
=> GuildHelper.DeleteEmoteAsync(this, Discord, emote.Id, options); |
|
|
|
|
|
|
|
@@ -630,71 +668,105 @@ namespace Discord.WebSocket |
|
|
internal SocketGuild Clone() => MemberwiseClone() as SocketGuild; |
|
|
internal SocketGuild Clone() => MemberwiseClone() as SocketGuild; |
|
|
|
|
|
|
|
|
//IGuild |
|
|
//IGuild |
|
|
|
|
|
/// <inheritdoc /> |
|
|
ulong? IGuild.AFKChannelId => AFKChannelId; |
|
|
ulong? IGuild.AFKChannelId => AFKChannelId; |
|
|
|
|
|
/// <inheritdoc /> |
|
|
IAudioClient IGuild.AudioClient => null; |
|
|
IAudioClient IGuild.AudioClient => null; |
|
|
|
|
|
/// <inheritdoc /> |
|
|
bool IGuild.Available => true; |
|
|
bool IGuild.Available => true; |
|
|
|
|
|
/// <inheritdoc /> |
|
|
ulong IGuild.DefaultChannelId => DefaultChannel?.Id ?? 0; |
|
|
ulong IGuild.DefaultChannelId => DefaultChannel?.Id ?? 0; |
|
|
|
|
|
/// <inheritdoc /> |
|
|
ulong? IGuild.EmbedChannelId => EmbedChannelId; |
|
|
ulong? IGuild.EmbedChannelId => EmbedChannelId; |
|
|
|
|
|
/// <inheritdoc /> |
|
|
ulong? IGuild.SystemChannelId => SystemChannelId; |
|
|
ulong? IGuild.SystemChannelId => SystemChannelId; |
|
|
|
|
|
/// <inheritdoc /> |
|
|
IRole IGuild.EveryoneRole => EveryoneRole; |
|
|
IRole IGuild.EveryoneRole => EveryoneRole; |
|
|
|
|
|
/// <inheritdoc /> |
|
|
IReadOnlyCollection<IRole> IGuild.Roles => Roles; |
|
|
IReadOnlyCollection<IRole> IGuild.Roles => Roles; |
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
async Task<IReadOnlyCollection<IBan>> IGuild.GetBansAsync(RequestOptions options) |
|
|
async Task<IReadOnlyCollection<IBan>> IGuild.GetBansAsync(RequestOptions options) |
|
|
=> await GetBansAsync(options).ConfigureAwait(false); |
|
|
=> await GetBansAsync(options).ConfigureAwait(false); |
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
Task<IReadOnlyCollection<IGuildChannel>> IGuild.GetChannelsAsync(CacheMode mode, RequestOptions options) |
|
|
Task<IReadOnlyCollection<IGuildChannel>> IGuild.GetChannelsAsync(CacheMode mode, RequestOptions options) |
|
|
=> Task.FromResult<IReadOnlyCollection<IGuildChannel>>(Channels); |
|
|
=> Task.FromResult<IReadOnlyCollection<IGuildChannel>>(Channels); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
Task<IGuildChannel> IGuild.GetChannelAsync(ulong id, CacheMode mode, RequestOptions options) |
|
|
Task<IGuildChannel> IGuild.GetChannelAsync(ulong id, CacheMode mode, RequestOptions options) |
|
|
=> Task.FromResult<IGuildChannel>(GetChannel(id)); |
|
|
=> Task.FromResult<IGuildChannel>(GetChannel(id)); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
Task<IReadOnlyCollection<ITextChannel>> IGuild.GetTextChannelsAsync(CacheMode mode, RequestOptions options) |
|
|
Task<IReadOnlyCollection<ITextChannel>> IGuild.GetTextChannelsAsync(CacheMode mode, RequestOptions options) |
|
|
=> Task.FromResult<IReadOnlyCollection<ITextChannel>>(TextChannels); |
|
|
=> Task.FromResult<IReadOnlyCollection<ITextChannel>>(TextChannels); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
Task<ITextChannel> IGuild.GetTextChannelAsync(ulong id, CacheMode mode, RequestOptions options) |
|
|
Task<ITextChannel> IGuild.GetTextChannelAsync(ulong id, CacheMode mode, RequestOptions options) |
|
|
=> Task.FromResult<ITextChannel>(GetTextChannel(id)); |
|
|
=> Task.FromResult<ITextChannel>(GetTextChannel(id)); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
Task<IReadOnlyCollection<IVoiceChannel>> IGuild.GetVoiceChannelsAsync(CacheMode mode, RequestOptions options) |
|
|
Task<IReadOnlyCollection<IVoiceChannel>> IGuild.GetVoiceChannelsAsync(CacheMode mode, RequestOptions options) |
|
|
=> Task.FromResult<IReadOnlyCollection<IVoiceChannel>>(VoiceChannels); |
|
|
=> Task.FromResult<IReadOnlyCollection<IVoiceChannel>>(VoiceChannels); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
Task<IReadOnlyCollection<ICategoryChannel>> IGuild.GetCategoriesAsync(CacheMode mode , RequestOptions options) |
|
|
Task<IReadOnlyCollection<ICategoryChannel>> IGuild.GetCategoriesAsync(CacheMode mode , RequestOptions options) |
|
|
=> Task.FromResult<IReadOnlyCollection<ICategoryChannel>>(CategoryChannels); |
|
|
=> Task.FromResult<IReadOnlyCollection<ICategoryChannel>>(CategoryChannels); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
Task<IVoiceChannel> IGuild.GetVoiceChannelAsync(ulong id, CacheMode mode, RequestOptions options) |
|
|
Task<IVoiceChannel> IGuild.GetVoiceChannelAsync(ulong id, CacheMode mode, RequestOptions options) |
|
|
=> Task.FromResult<IVoiceChannel>(GetVoiceChannel(id)); |
|
|
=> Task.FromResult<IVoiceChannel>(GetVoiceChannel(id)); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
Task<IVoiceChannel> IGuild.GetAFKChannelAsync(CacheMode mode, RequestOptions options) |
|
|
Task<IVoiceChannel> IGuild.GetAFKChannelAsync(CacheMode mode, RequestOptions options) |
|
|
=> Task.FromResult<IVoiceChannel>(AFKChannel); |
|
|
=> Task.FromResult<IVoiceChannel>(AFKChannel); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
Task<ITextChannel> IGuild.GetDefaultChannelAsync(CacheMode mode, RequestOptions options) |
|
|
Task<ITextChannel> IGuild.GetDefaultChannelAsync(CacheMode mode, RequestOptions options) |
|
|
=> Task.FromResult<ITextChannel>(DefaultChannel); |
|
|
=> Task.FromResult<ITextChannel>(DefaultChannel); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
Task<IGuildChannel> IGuild.GetEmbedChannelAsync(CacheMode mode, RequestOptions options) |
|
|
Task<IGuildChannel> IGuild.GetEmbedChannelAsync(CacheMode mode, RequestOptions options) |
|
|
=> Task.FromResult<IGuildChannel>(EmbedChannel); |
|
|
=> Task.FromResult<IGuildChannel>(EmbedChannel); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
Task<ITextChannel> IGuild.GetSystemChannelAsync(CacheMode mode, RequestOptions options) |
|
|
Task<ITextChannel> IGuild.GetSystemChannelAsync(CacheMode mode, RequestOptions options) |
|
|
=> Task.FromResult<ITextChannel>(SystemChannel); |
|
|
=> Task.FromResult<ITextChannel>(SystemChannel); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
async Task<ITextChannel> IGuild.CreateTextChannelAsync(string name, RequestOptions options) |
|
|
async Task<ITextChannel> IGuild.CreateTextChannelAsync(string name, RequestOptions options) |
|
|
=> await CreateTextChannelAsync(name, options).ConfigureAwait(false); |
|
|
=> await CreateTextChannelAsync(name, options).ConfigureAwait(false); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
async Task<IVoiceChannel> IGuild.CreateVoiceChannelAsync(string name, RequestOptions options) |
|
|
async Task<IVoiceChannel> IGuild.CreateVoiceChannelAsync(string name, RequestOptions options) |
|
|
=> await CreateVoiceChannelAsync(name, options).ConfigureAwait(false); |
|
|
=> await CreateVoiceChannelAsync(name, options).ConfigureAwait(false); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
async Task<ICategoryChannel> IGuild.CreateCategoryAsync(string name, RequestOptions options) |
|
|
async Task<ICategoryChannel> IGuild.CreateCategoryAsync(string name, RequestOptions options) |
|
|
=> await CreateCategoryChannelAsync(name, options).ConfigureAwait(false); |
|
|
=> await CreateCategoryChannelAsync(name, options).ConfigureAwait(false); |
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
async Task<IReadOnlyCollection<IGuildIntegration>> IGuild.GetIntegrationsAsync(RequestOptions options) |
|
|
async Task<IReadOnlyCollection<IGuildIntegration>> IGuild.GetIntegrationsAsync(RequestOptions options) |
|
|
=> await GetIntegrationsAsync(options).ConfigureAwait(false); |
|
|
=> await GetIntegrationsAsync(options).ConfigureAwait(false); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
async Task<IGuildIntegration> IGuild.CreateIntegrationAsync(ulong id, string type, RequestOptions options) |
|
|
async Task<IGuildIntegration> IGuild.CreateIntegrationAsync(ulong id, string type, RequestOptions options) |
|
|
=> await CreateIntegrationAsync(id, type, options).ConfigureAwait(false); |
|
|
=> await CreateIntegrationAsync(id, type, options).ConfigureAwait(false); |
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
async Task<IReadOnlyCollection<IInviteMetadata>> IGuild.GetInvitesAsync(RequestOptions options) |
|
|
async Task<IReadOnlyCollection<IInviteMetadata>> IGuild.GetInvitesAsync(RequestOptions options) |
|
|
=> await GetInvitesAsync(options).ConfigureAwait(false); |
|
|
=> await GetInvitesAsync(options).ConfigureAwait(false); |
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
IRole IGuild.GetRole(ulong id) |
|
|
IRole IGuild.GetRole(ulong id) |
|
|
=> GetRole(id); |
|
|
=> GetRole(id); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
async Task<IRole> IGuild.CreateRoleAsync(string name, GuildPermissions? permissions, Color? color, bool isHoisted, RequestOptions options) |
|
|
async Task<IRole> IGuild.CreateRoleAsync(string name, GuildPermissions? permissions, Color? color, bool isHoisted, RequestOptions options) |
|
|
=> await CreateRoleAsync(name, permissions, color, isHoisted, options).ConfigureAwait(false); |
|
|
=> await CreateRoleAsync(name, permissions, color, isHoisted, options).ConfigureAwait(false); |
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
Task<IReadOnlyCollection<IGuildUser>> IGuild.GetUsersAsync(CacheMode mode, RequestOptions options) |
|
|
Task<IReadOnlyCollection<IGuildUser>> IGuild.GetUsersAsync(CacheMode mode, RequestOptions options) |
|
|
=> Task.FromResult<IReadOnlyCollection<IGuildUser>>(Users); |
|
|
=> Task.FromResult<IReadOnlyCollection<IGuildUser>>(Users); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
Task<IGuildUser> IGuild.GetUserAsync(ulong id, CacheMode mode, RequestOptions options) |
|
|
Task<IGuildUser> IGuild.GetUserAsync(ulong id, CacheMode mode, RequestOptions options) |
|
|
=> Task.FromResult<IGuildUser>(GetUser(id)); |
|
|
=> Task.FromResult<IGuildUser>(GetUser(id)); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
Task<IGuildUser> IGuild.GetCurrentUserAsync(CacheMode mode, RequestOptions options) |
|
|
Task<IGuildUser> IGuild.GetCurrentUserAsync(CacheMode mode, RequestOptions options) |
|
|
=> Task.FromResult<IGuildUser>(CurrentUser); |
|
|
=> Task.FromResult<IGuildUser>(CurrentUser); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
Task<IGuildUser> IGuild.GetOwnerAsync(CacheMode mode, RequestOptions options) |
|
|
Task<IGuildUser> IGuild.GetOwnerAsync(CacheMode mode, RequestOptions options) |
|
|
=> Task.FromResult<IGuildUser>(Owner); |
|
|
=> Task.FromResult<IGuildUser>(Owner); |
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
async Task<IWebhook> IGuild.GetWebhookAsync(ulong id, RequestOptions options) |
|
|
async Task<IWebhook> IGuild.GetWebhookAsync(ulong id, RequestOptions options) |
|
|
=> await GetWebhookAsync(id, options); |
|
|
=> await GetWebhookAsync(id, options); |
|
|
|
|
|
/// <inheritdoc /> |
|
|
async Task<IReadOnlyCollection<IWebhook>> IGuild.GetWebhooksAsync(RequestOptions options) |
|
|
async Task<IReadOnlyCollection<IWebhook>> IGuild.GetWebhooksAsync(RequestOptions options) |
|
|
=> await GetWebhooksAsync(options); |
|
|
=> await GetWebhooksAsync(options); |
|
|
} |
|
|
} |
|
|