commitpull/2436/head515bec1af9Author: Fokusnikh <96922685+Polybroo@users.noreply.github.com> Date: Tue Aug 23 20:06:14 2022 +0200 GetPrivateArchivedThreads and GetJoinedPrivateArchivedThreads are now GuildChannel's thing commit383bd2bb01Author: Fokusnikh <96922685+Polybroo@users.noreply.github.com> Date: Tue Aug 23 19:42:30 2022 +0200 GetActiveThreads and GetPublicArchivedThreads are now GuildChannel's thing
| @@ -163,54 +163,5 @@ namespace Discord | |||||
| public Task<IThreadChannel> CreatePostWithFilesAsync(string title, IEnumerable<FileAttachment> attachments, ThreadArchiveDuration archiveDuration = ThreadArchiveDuration.OneDay, | public Task<IThreadChannel> CreatePostWithFilesAsync(string title, IEnumerable<FileAttachment> attachments, ThreadArchiveDuration archiveDuration = ThreadArchiveDuration.OneDay, | ||||
| int? slowmode = null, string text = null, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, | int? slowmode = null, string text = null, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, | ||||
| MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None); | MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None); | ||||
| /// <summary> | |||||
| /// Gets a collection of active threads within this forum channel. | |||||
| /// </summary> | |||||
| /// <param name="options">The options to be used when sending the request.</param> | |||||
| /// <returns> | |||||
| /// A task that represents an asynchronous get operation for retrieving the threads. The task result contains | |||||
| /// a collection of active threads. | |||||
| /// </returns> | |||||
| Task<IReadOnlyCollection<IThreadChannel>> GetActiveThreadsAsync(RequestOptions options = null); | |||||
| /// <summary> | |||||
| /// Gets a collection of publicly archived threads within this forum channel. | |||||
| /// </summary> | |||||
| /// <param name="limit">The optional limit of how many to get.</param> | |||||
| /// <param name="before">The optional date to return threads created before this timestamp.</param> | |||||
| /// <param name="options">The options to be used when sending the request.</param> | |||||
| /// <returns> | |||||
| /// A task that represents an asynchronous get operation for retrieving the threads. The task result contains | |||||
| /// a collection of publicly archived threads. | |||||
| /// </returns> | |||||
| Task<IReadOnlyCollection<IThreadChannel>> GetPublicArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null); | |||||
| /// <summary> | |||||
| /// Gets a collection of privately archived threads within this forum channel. | |||||
| /// </summary> | |||||
| /// <remarks> | |||||
| /// The bot requires the <see cref="GuildPermission.ManageThreads"/> permission in order to execute this request. | |||||
| /// </remarks> | |||||
| /// <param name="limit">The optional limit of how many to get.</param> | |||||
| /// <param name="before">The optional date to return threads created before this timestamp.</param> | |||||
| /// <param name="options">The options to be used when sending the request.</param> | |||||
| /// <returns> | |||||
| /// A task that represents an asynchronous get operation for retrieving the threads. The task result contains | |||||
| /// a collection of privately archived threads. | |||||
| /// </returns> | |||||
| Task<IReadOnlyCollection<IThreadChannel>> GetPrivateArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null); | |||||
| /// <summary> | |||||
| /// Gets a collection of privately archived threads that the current bot has joined within this forum channel. | |||||
| /// </summary> | |||||
| /// <param name="limit">The optional limit of how many to get.</param> | |||||
| /// <param name="before">The optional date to return threads created before this timestamp.</param> | |||||
| /// <param name="options">The options to be used when sending the request.</param> | |||||
| /// <returns> | |||||
| /// A task that represents an asynchronous get operation for retrieving the threads. The task result contains | |||||
| /// a collection of privately archived threads. | |||||
| /// </returns> | |||||
| Task<IReadOnlyCollection<IThreadChannel>> GetJoinedPrivateArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null); | |||||
| } | } | ||||
| } | } | ||||
| @@ -155,5 +155,54 @@ namespace Discord | |||||
| /// represents the user; <c>null</c> if none is found. | /// represents the user; <c>null</c> if none is found. | ||||
| /// </returns> | /// </returns> | ||||
| new Task<IGuildUser> GetUserAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null); | new Task<IGuildUser> GetUserAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null); | ||||
| /// <summary> | |||||
| /// Gets a collection of active threads within this guild channel. | |||||
| /// </summary> | |||||
| /// <param name="options">The options to be used when sending the request.</param> | |||||
| /// <returns> | |||||
| /// A task that represents an asynchronous get operation for retrieving the threads. The task result contains | |||||
| /// a collection of active threads. | |||||
| /// </returns> | |||||
| Task<IReadOnlyCollection<IThreadChannel>> GetActiveThreadsAsync(RequestOptions options = null); | |||||
| /// <summary> | |||||
| /// Gets a collection of publicly archived threads within this guild channel. | |||||
| /// </summary> | |||||
| /// <param name="limit">The optional limit of how many to get.</param> | |||||
| /// <param name="before">The optional date to return threads created before this timestamp.</param> | |||||
| /// <param name="options">The options to be used when sending the request.</param> | |||||
| /// <returns> | |||||
| /// A task that represents an asynchronous get operation for retrieving the threads. The task result contains | |||||
| /// a collection of publicly archived threads. | |||||
| /// </returns> | |||||
| Task<IReadOnlyCollection<IThreadChannel>> GetPublicArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null); | |||||
| /// <summary> | |||||
| /// Gets a collection of privately archived threads within this guild channel. | |||||
| /// </summary> | |||||
| /// <remarks> | |||||
| /// The bot requires the <see cref="GuildPermission.ManageThreads"/> permission in order to execute this request. | |||||
| /// </remarks> | |||||
| /// <param name="limit">The optional limit of how many to get.</param> | |||||
| /// <param name="before">The optional date to return threads created before this timestamp.</param> | |||||
| /// <param name="options">The options to be used when sending the request.</param> | |||||
| /// <returns> | |||||
| /// A task that represents an asynchronous get operation for retrieving the threads. The task result contains | |||||
| /// a collection of privately archived threads. | |||||
| /// </returns> | |||||
| Task<IReadOnlyCollection<IThreadChannel>> GetPrivateArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null); | |||||
| /// <summary> | |||||
| /// Gets a collection of privately archived threads that the current bot has joined within this guild channel. | |||||
| /// </summary> | |||||
| /// <param name="limit">The optional limit of how many to get.</param> | |||||
| /// <param name="before">The optional date to return threads created before this timestamp.</param> | |||||
| /// <param name="options">The options to be used when sending the request.</param> | |||||
| /// <returns> | |||||
| /// A task that represents an asynchronous get operation for retrieving the threads. The task result contains | |||||
| /// a collection of privately archived threads. | |||||
| /// </returns> | |||||
| Task<IReadOnlyCollection<IThreadChannel>> GetJoinedPrivateArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null); | |||||
| } | } | ||||
| } | } | ||||
| @@ -90,31 +90,8 @@ namespace Discord.Rest | |||||
| MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None) | MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None) | ||||
| => ThreadHelper.CreatePostAsync(this, Discord, title, attachments, archiveDuration, slowmode, text, embed, options, allowedMentions, components, stickers, embeds, flags); | => ThreadHelper.CreatePostAsync(this, Discord, title, attachments, archiveDuration, slowmode, text, embed, options, allowedMentions, components, stickers, embeds, flags); | ||||
| /// <inheritdoc cref="IForumChannel.GetActiveThreadsAsync(RequestOptions)"/> | |||||
| public Task<IReadOnlyCollection<RestThreadChannel>> GetActiveThreadsAsync(RequestOptions options = null) | |||||
| => ThreadHelper.GetActiveThreadsInChannelAsync(Guild, this, Discord, options); | |||||
| /// <inheritdoc cref="IForumChannel.GetJoinedPrivateArchivedThreadsAsync(int?, DateTimeOffset?, RequestOptions)"/> | |||||
| public Task<IReadOnlyCollection<RestThreadChannel>> GetJoinedPrivateArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null) | |||||
| => ThreadHelper.GetJoinedPrivateArchivedThreadsAsync(this, Discord, limit, before, options); | |||||
| /// <inheritdoc cref="IForumChannel.GetPrivateArchivedThreadsAsync(int?, DateTimeOffset?, RequestOptions)"/> | |||||
| public Task<IReadOnlyCollection<RestThreadChannel>> GetPrivateArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null) | |||||
| => ThreadHelper.GetPrivateArchivedThreadsAsync(this, Discord, limit, before, options); | |||||
| /// <inheritdoc cref="IForumChannel.GetPublicArchivedThreadsAsync(int?, DateTimeOffset?, RequestOptions)"/> | |||||
| public Task<IReadOnlyCollection<RestThreadChannel>> GetPublicArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null) | |||||
| => ThreadHelper.GetPublicArchivedThreadsAsync(this, Discord, limit, before, options); | |||||
| #region IForumChannel | #region IForumChannel | ||||
| async Task<IReadOnlyCollection<IThreadChannel>> IForumChannel.GetActiveThreadsAsync(RequestOptions options) | |||||
| => await GetActiveThreadsAsync(options).ConfigureAwait(false); | |||||
| async Task<IReadOnlyCollection<IThreadChannel>> IForumChannel.GetPublicArchivedThreadsAsync(int? limit, DateTimeOffset? before, RequestOptions options) | |||||
| => await GetPublicArchivedThreadsAsync(limit, before, options).ConfigureAwait(false); | |||||
| async Task<IReadOnlyCollection<IThreadChannel>> IForumChannel.GetPrivateArchivedThreadsAsync(int? limit, DateTimeOffset? before, RequestOptions options) | |||||
| => await GetPrivateArchivedThreadsAsync(limit, before, options).ConfigureAwait(false); | |||||
| async Task<IReadOnlyCollection<IThreadChannel>> IForumChannel.GetJoinedPrivateArchivedThreadsAsync(int? limit, DateTimeOffset? before, RequestOptions options) | |||||
| => await GetJoinedPrivateArchivedThreadsAsync(limit, before, options).ConfigureAwait(false); | |||||
| async Task<IThreadChannel> IForumChannel.CreatePostAsync(string title, ThreadArchiveDuration archiveDuration, int? slowmode, string text, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags) | async Task<IThreadChannel> IForumChannel.CreatePostAsync(string title, ThreadArchiveDuration archiveDuration, int? slowmode, string text, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags) | ||||
| => await CreatePostAsync(title, archiveDuration, slowmode, text, embed, options, allowedMentions, components, stickers, embeds, flags).ConfigureAwait(false); | => await CreatePostAsync(title, archiveDuration, slowmode, text, embed, options, allowedMentions, components, stickers, embeds, flags).ConfigureAwait(false); | ||||
| async Task<IThreadChannel> IForumChannel.CreatePostWithFileAsync(string title, string filePath, ThreadArchiveDuration archiveDuration, int? slowmode, string text, Embed embed, RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags) | async Task<IThreadChannel> IForumChannel.CreatePostWithFileAsync(string title, string filePath, ThreadArchiveDuration archiveDuration, int? slowmode, string text, Embed embed, RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags) | ||||
| @@ -232,6 +232,33 @@ namespace Discord.Rest | |||||
| /// <inheritdoc /> | /// <inheritdoc /> | ||||
| Task<IGuildUser> IGuildChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options) | Task<IGuildUser> IGuildChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options) | ||||
| => Task.FromResult<IGuildUser>(null); //Overridden in Text/Voice | => Task.FromResult<IGuildUser>(null); //Overridden in Text/Voice | ||||
| /// <inheritdoc cref="IGuildChannel.GetActiveThreadsAsync(RequestOptions)"/> | |||||
| public Task<IReadOnlyCollection<RestThreadChannel>> GetActiveThreadsAsync(RequestOptions options = null) | |||||
| => ThreadHelper.GetActiveThreadsInChannelAsync(Guild, this, Discord, options); | |||||
| /// <inheritdoc cref="IGuildChannel.GetPublicArchivedThreadsAsync(int?, DateTimeOffset?, RequestOptions)"/> | |||||
| public Task<IReadOnlyCollection<RestThreadChannel>> GetPublicArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null) | |||||
| => ThreadHelper.GetPublicArchivedThreadsAsync(this, Discord, limit, before, options); | |||||
| /// <inheritdoc cref="IGuildChannel.GetJoinedPrivateArchivedThreadsAsync(int?, DateTimeOffset?, RequestOptions)"/> | |||||
| public Task<IReadOnlyCollection<RestThreadChannel>> GetJoinedPrivateArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null) | |||||
| => ThreadHelper.GetJoinedPrivateArchivedThreadsAsync(this, Discord, limit, before, options); | |||||
| /// <inheritdoc cref="IGuildChannel.GetPrivateArchivedThreadsAsync(int?, DateTimeOffset?, RequestOptions)"/> | |||||
| public Task<IReadOnlyCollection<RestThreadChannel>> GetPrivateArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null) | |||||
| => ThreadHelper.GetPrivateArchivedThreadsAsync(this, Discord, limit, before, options); | |||||
| async Task<IReadOnlyCollection<IThreadChannel>> IGuildChannel.GetActiveThreadsAsync(RequestOptions options) | |||||
| => await GetActiveThreadsAsync(options).ConfigureAwait(false); | |||||
| async Task<IReadOnlyCollection<IThreadChannel>> IGuildChannel.GetPublicArchivedThreadsAsync(int? limit, DateTimeOffset? before, RequestOptions options) | |||||
| => await GetPublicArchivedThreadsAsync(limit, before, options).ConfigureAwait(false); | |||||
| async Task<IReadOnlyCollection<IThreadChannel>> IGuildChannel.GetPrivateArchivedThreadsAsync(int? limit, DateTimeOffset? before, RequestOptions options) | |||||
| => await GetPrivateArchivedThreadsAsync(limit, before, options).ConfigureAwait(false); | |||||
| async Task<IReadOnlyCollection<IThreadChannel>> IGuildChannel.GetJoinedPrivateArchivedThreadsAsync(int? limit, DateTimeOffset? before, RequestOptions options) | |||||
| => await GetJoinedPrivateArchivedThreadsAsync(limit, before, options).ConfigureAwait(false); | |||||
| #endregion | #endregion | ||||
| #region IChannel | #region IChannel | ||||
| @@ -87,31 +87,9 @@ namespace Discord.WebSocket | |||||
| MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None) | MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None) | ||||
| => ThreadHelper.CreatePostAsync(this, Discord, title, attachments, archiveDuration, slowmode, text, embed, options, allowedMentions, components, stickers, embeds, flags); | => ThreadHelper.CreatePostAsync(this, Discord, title, attachments, archiveDuration, slowmode, text, embed, options, allowedMentions, components, stickers, embeds, flags); | ||||
| /// <inheritdoc cref="IForumChannel.GetActiveThreadsAsync(RequestOptions)"/> | |||||
| public Task<IReadOnlyCollection<RestThreadChannel>> GetActiveThreadsAsync(RequestOptions options = null) | |||||
| => ThreadHelper.GetActiveThreadsInChannelAsync(Guild, this, Discord, options); | |||||
| /// <inheritdoc cref="IForumChannel.GetJoinedPrivateArchivedThreadsAsync(int?, DateTimeOffset?, RequestOptions)"/> | |||||
| public Task<IReadOnlyCollection<RestThreadChannel>> GetJoinedPrivateArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null) | |||||
| => ThreadHelper.GetJoinedPrivateArchivedThreadsAsync(this, Discord, limit, before, options); | |||||
| /// <inheritdoc cref="IForumChannel.GetPrivateArchivedThreadsAsync(int?, DateTimeOffset?, RequestOptions)"/> | |||||
| public Task<IReadOnlyCollection<RestThreadChannel>> GetPrivateArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null) | |||||
| => ThreadHelper.GetPrivateArchivedThreadsAsync(this, Discord, limit, before, options); | |||||
| /// <inheritdoc cref="IForumChannel.GetPublicArchivedThreadsAsync(int?, DateTimeOffset?, RequestOptions)"/> | |||||
| public Task<IReadOnlyCollection<RestThreadChannel>> GetPublicArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null) | |||||
| => ThreadHelper.GetPublicArchivedThreadsAsync(this, Discord, limit, before, options); | |||||
| #region IForumChannel | #region IForumChannel | ||||
| async Task<IReadOnlyCollection<IThreadChannel>> IForumChannel.GetActiveThreadsAsync(RequestOptions options) | |||||
| => await GetActiveThreadsAsync(options).ConfigureAwait(false); | |||||
| async Task<IReadOnlyCollection<IThreadChannel>> IForumChannel.GetPublicArchivedThreadsAsync(int? limit, DateTimeOffset? before, RequestOptions options) | |||||
| => await GetPublicArchivedThreadsAsync(limit, before, options).ConfigureAwait(false); | |||||
| async Task<IReadOnlyCollection<IThreadChannel>> IForumChannel.GetPrivateArchivedThreadsAsync(int? limit, DateTimeOffset? before, RequestOptions options) | |||||
| => await GetPrivateArchivedThreadsAsync(limit, before, options).ConfigureAwait(false); | |||||
| async Task<IReadOnlyCollection<IThreadChannel>> IForumChannel.GetJoinedPrivateArchivedThreadsAsync(int? limit, DateTimeOffset? before, RequestOptions options) | |||||
| => await GetJoinedPrivateArchivedThreadsAsync(limit, before, options).ConfigureAwait(false); | |||||
| async Task<IThreadChannel> IForumChannel.CreatePostAsync(string title, ThreadArchiveDuration archiveDuration, int? slowmode, string text, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags) | async Task<IThreadChannel> IForumChannel.CreatePostAsync(string title, ThreadArchiveDuration archiveDuration, int? slowmode, string text, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags) | ||||
| => await CreatePostAsync(title, archiveDuration, slowmode, text, embed, options, allowedMentions, components, stickers, embeds, flags).ConfigureAwait(false); | => await CreatePostAsync(title, archiveDuration, slowmode, text, embed, options, allowedMentions, components, stickers, embeds, flags).ConfigureAwait(false); | ||||
| async Task<IThreadChannel> IForumChannel.CreatePostWithFileAsync(string title, string filePath, ThreadArchiveDuration archiveDuration, int? slowmode, string text, Embed embed, RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags) | async Task<IThreadChannel> IForumChannel.CreatePostWithFileAsync(string title, string filePath, ThreadArchiveDuration archiveDuration, int? slowmode, string text, Embed embed, RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags) | ||||
| @@ -176,6 +176,24 @@ namespace Discord.WebSocket | |||||
| /// <returns> | /// <returns> | ||||
| /// A string that resolves to <see cref="SocketGuildChannel.Name"/>. | /// A string that resolves to <see cref="SocketGuildChannel.Name"/>. | ||||
| /// </returns> | /// </returns> | ||||
| /// <inheritdoc cref="IGuildChannel.GetActiveThreadsAsync(RequestOptions)"/> | |||||
| public Task<IReadOnlyCollection<RestThreadChannel>> GetActiveThreadsAsync(RequestOptions options = null) | |||||
| => ThreadHelper.GetActiveThreadsInChannelAsync(Guild, this, Discord, options); | |||||
| /// <inheritdoc cref="IGuildChannel.GetPublicArchivedThreadsAsync(int?, DateTimeOffset?, RequestOptions)"/> | |||||
| public Task<IReadOnlyCollection<RestThreadChannel>> GetPublicArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null) | |||||
| => ThreadHelper.GetPublicArchivedThreadsAsync(this, Discord, limit, before, options); | |||||
| /// <inheritdoc cref="IGuildChannel.GetJoinedPrivateArchivedThreadsAsync(int?, DateTimeOffset?, RequestOptions)"/> | |||||
| public Task<IReadOnlyCollection<RestThreadChannel>> GetJoinedPrivateArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null) | |||||
| => ThreadHelper.GetJoinedPrivateArchivedThreadsAsync(this, Discord, limit, before, options); | |||||
| /// <inheritdoc cref="IGuildChannel.GetPrivateArchivedThreadsAsync(int?, DateTimeOffset?, RequestOptions)"/> | |||||
| public Task<IReadOnlyCollection<RestThreadChannel>> GetPrivateArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null) | |||||
| => ThreadHelper.GetPrivateArchivedThreadsAsync(this, Discord, limit, before, options); | |||||
| public override string ToString() => Name; | public override string ToString() => Name; | ||||
| private string DebuggerDisplay => $"{Name} ({Id}, Guild)"; | private string DebuggerDisplay => $"{Name} ({Id}, Guild)"; | ||||
| internal new SocketGuildChannel Clone() => MemberwiseClone() as SocketGuildChannel; | internal new SocketGuildChannel Clone() => MemberwiseClone() as SocketGuildChannel; | ||||
| @@ -219,6 +237,14 @@ namespace Discord.WebSocket | |||||
| /// <inheritdoc /> | /// <inheritdoc /> | ||||
| Task<IGuildUser> IGuildChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options) | Task<IGuildUser> IGuildChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options) | ||||
| => Task.FromResult<IGuildUser>(GetUser(id)); //Overridden in Text/Voice | => Task.FromResult<IGuildUser>(GetUser(id)); //Overridden in Text/Voice | ||||
| async Task<IReadOnlyCollection<IThreadChannel>> IGuildChannel.GetActiveThreadsAsync(RequestOptions options) | |||||
| => await GetActiveThreadsAsync(options).ConfigureAwait(false); | |||||
| async Task<IReadOnlyCollection<IThreadChannel>> IGuildChannel.GetPublicArchivedThreadsAsync(int? limit, DateTimeOffset? before, RequestOptions options) | |||||
| => await GetPublicArchivedThreadsAsync(limit, before, options).ConfigureAwait(false); | |||||
| async Task<IReadOnlyCollection<IThreadChannel>> IGuildChannel.GetPrivateArchivedThreadsAsync(int? limit, DateTimeOffset? before, RequestOptions options) | |||||
| => await GetPrivateArchivedThreadsAsync(limit, before, options).ConfigureAwait(false); | |||||
| async Task<IReadOnlyCollection<IThreadChannel>> IGuildChannel.GetJoinedPrivateArchivedThreadsAsync(int? limit, DateTimeOffset? before, RequestOptions options) | |||||
| => await GetJoinedPrivateArchivedThreadsAsync(limit, before, options).ConfigureAwait(false); | |||||
| #endregion | #endregion | ||||
| #region IChannel | #region IChannel | ||||
| @@ -36,6 +36,9 @@ namespace Discord | |||||
| throw new NotImplementedException(); | throw new NotImplementedException(); | ||||
| } | } | ||||
| public Task<IReadOnlyCollection<IThreadChannel>> GetActiveThreadsAsync(RequestOptions options = null) => throw new NotImplementedException(); | |||||
| public Task<IReadOnlyCollection<IThreadChannel>> GetJoinedPrivateArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null) => throw new NotImplementedException(); | |||||
| public OverwritePermissions? GetPermissionOverwrite(IRole role) | public OverwritePermissions? GetPermissionOverwrite(IRole role) | ||||
| { | { | ||||
| throw new NotImplementedException(); | throw new NotImplementedException(); | ||||
| @@ -46,6 +49,9 @@ namespace Discord | |||||
| throw new NotImplementedException(); | throw new NotImplementedException(); | ||||
| } | } | ||||
| public Task<IReadOnlyCollection<IThreadChannel>> GetPrivateArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null) => throw new NotImplementedException(); | |||||
| public Task<IReadOnlyCollection<IThreadChannel>> GetPublicArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null) => throw new NotImplementedException(); | |||||
| public Task<IGuildUser> GetUserAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null) | public Task<IGuildUser> GetUserAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null) | ||||
| { | { | ||||
| throw new NotImplementedException(); | throw new NotImplementedException(); | ||||
| @@ -218,5 +218,9 @@ namespace Discord | |||||
| public Task<IThreadChannel> CreateThreadAsync(string name, ThreadType type = ThreadType.PublicThread, ThreadArchiveDuration autoArchiveDuration = ThreadArchiveDuration.OneDay, IMessage message = null, bool? invitable = null, int? slowmode = null, RequestOptions options = null, MessageFlags flags = MessageFlags.None) => throw new NotImplementedException(); | public Task<IThreadChannel> CreateThreadAsync(string name, ThreadType type = ThreadType.PublicThread, ThreadArchiveDuration autoArchiveDuration = ThreadArchiveDuration.OneDay, IMessage message = null, bool? invitable = null, int? slowmode = null, RequestOptions options = null, MessageFlags flags = MessageFlags.None) => throw new NotImplementedException(); | ||||
| public Task<IInviteMetadata> CreateInviteToApplicationAsync(DefaultApplications application, int? maxAge = 86400, int? maxUses = null, bool isTemporary = false, bool isUnique = false, RequestOptions options = null) => throw new NotImplementedException(); | public Task<IInviteMetadata> CreateInviteToApplicationAsync(DefaultApplications application, int? maxAge = 86400, int? maxUses = null, bool isTemporary = false, bool isUnique = false, RequestOptions options = null) => throw new NotImplementedException(); | ||||
| public Task<IThreadChannel> CreateThreadAsync(string name, ThreadType type = ThreadType.PublicThread, ThreadArchiveDuration autoArchiveDuration = ThreadArchiveDuration.OneDay, IMessage message = null, bool? invitable = null, int? slowmode = null, RequestOptions options = null) => throw new NotImplementedException(); | public Task<IThreadChannel> CreateThreadAsync(string name, ThreadType type = ThreadType.PublicThread, ThreadArchiveDuration autoArchiveDuration = ThreadArchiveDuration.OneDay, IMessage message = null, bool? invitable = null, int? slowmode = null, RequestOptions options = null) => throw new NotImplementedException(); | ||||
| public Task<IReadOnlyCollection<IThreadChannel>> GetActiveThreadsAsync(RequestOptions options = null) => throw new NotImplementedException(); | |||||
| public Task<IReadOnlyCollection<IThreadChannel>> GetPublicArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null) => throw new NotImplementedException(); | |||||
| public Task<IReadOnlyCollection<IThreadChannel>> GetPrivateArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null) => throw new NotImplementedException(); | |||||
| public Task<IReadOnlyCollection<IThreadChannel>> GetJoinedPrivateArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null) => throw new NotImplementedException(); | |||||
| } | } | ||||
| } | } | ||||
| @@ -74,5 +74,9 @@ namespace Discord | |||||
| public Task TriggerTypingAsync(RequestOptions options = null) => throw new NotImplementedException(); | public Task TriggerTypingAsync(RequestOptions options = null) => throw new NotImplementedException(); | ||||
| Task<IUser> IChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options) => throw new NotImplementedException(); | Task<IUser> IChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options) => throw new NotImplementedException(); | ||||
| IAsyncEnumerable<IReadOnlyCollection<IUser>> IChannel.GetUsersAsync(CacheMode mode, RequestOptions options) => throw new NotImplementedException(); | IAsyncEnumerable<IReadOnlyCollection<IUser>> IChannel.GetUsersAsync(CacheMode mode, RequestOptions options) => throw new NotImplementedException(); | ||||
| public Task<IReadOnlyCollection<IThreadChannel>> GetActiveThreadsAsync(RequestOptions options = null) => throw new NotImplementedException(); | |||||
| public Task<IReadOnlyCollection<IThreadChannel>> GetPublicArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null) => throw new NotImplementedException(); | |||||
| public Task<IReadOnlyCollection<IThreadChannel>> GetPrivateArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null) => throw new NotImplementedException(); | |||||
| public Task<IReadOnlyCollection<IThreadChannel>> GetJoinedPrivateArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null) => throw new NotImplementedException(); | |||||
| } | } | ||||
| } | } | ||||