From 49e7eb8105a66d6fc9681067b16abd3353371d14 Mon Sep 17 00:00:00 2001 From: Misha133 Date: Thu, 5 Jan 2023 12:25:54 +0300 Subject: [PATCH] remove outdated checks --- .../Entities/Channels/RestTextChannel.cs | 5 ----- src/Discord.Net.Rest/Entities/Channels/ThreadHelper.cs | 10 ---------- .../Entities/Channels/SocketTextChannel.cs | 5 ----- 3 files changed, 20 deletions(-) diff --git a/src/Discord.Net.Rest/Entities/Channels/RestTextChannel.cs b/src/Discord.Net.Rest/Entities/Channels/RestTextChannel.cs index f0669534e..b48b1d0d8 100644 --- a/src/Discord.Net.Rest/Entities/Channels/RestTextChannel.cs +++ b/src/Discord.Net.Rest/Entities/Channels/RestTextChannel.cs @@ -257,11 +257,6 @@ namespace Discord.Rest /// /// /// The duration on which this thread archives after. - /// - /// Note: Options and - /// are only available for guilds that are boosted. You can check in the to see if the - /// guild has the THREE_DAY_THREAD_ARCHIVE and SEVEN_DAY_THREAD_ARCHIVE. - /// /// /// The message which to start the thread from. /// The options to be used when sending the request. diff --git a/src/Discord.Net.Rest/Entities/Channels/ThreadHelper.cs b/src/Discord.Net.Rest/Entities/Channels/ThreadHelper.cs index 8b5926867..f1c6c0efb 100644 --- a/src/Discord.Net.Rest/Entities/Channels/ThreadHelper.cs +++ b/src/Discord.Net.Rest/Entities/Channels/ThreadHelper.cs @@ -14,16 +14,6 @@ namespace Discord.Rest public static async Task CreateThreadAsync(BaseDiscordClient client, ITextChannel channel, string name, ThreadType type = ThreadType.PublicThread, ThreadArchiveDuration autoArchiveDuration = ThreadArchiveDuration.OneDay, IMessage message = null, bool? invitable = null, int? slowmode = null, RequestOptions options = null) { - var features = channel.Guild.Features; - if (autoArchiveDuration == ThreadArchiveDuration.OneWeek && !features.HasFeature(GuildFeature.SevenDayThreadArchive)) - throw new ArgumentException($"The guild {channel.Guild.Name} does not have the SEVEN_DAY_THREAD_ARCHIVE feature!", nameof(autoArchiveDuration)); - - if (autoArchiveDuration == ThreadArchiveDuration.ThreeDays && !features.HasFeature(GuildFeature.ThreeDayThreadArchive)) - throw new ArgumentException($"The guild {channel.Guild.Name} does not have the THREE_DAY_THREAD_ARCHIVE feature!", nameof(autoArchiveDuration)); - - if (type == ThreadType.PrivateThread && !features.HasFeature(GuildFeature.PrivateThreads)) - throw new ArgumentException($"The guild {channel.Guild.Name} does not have the PRIVATE_THREADS feature!", nameof(type)); - if (channel is INewsChannel && type != ThreadType.NewsThread) throw new ArgumentException($"{nameof(type)} must be a {ThreadType.NewsThread} in News channels"); diff --git a/src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs b/src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs index 48da69e09..880eee87c 100644 --- a/src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs +++ b/src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs @@ -107,11 +107,6 @@ namespace Discord.WebSocket /// /// /// The duration on which this thread archives after. - /// - /// Note: Options and - /// are only available for guilds that are boosted. You can check in the to see if the - /// guild has the THREE_DAY_THREAD_ARCHIVE and SEVEN_DAY_THREAD_ARCHIVE. - /// /// /// The message which to start the thread from. /// The options to be used when sending the request.