Browse Source

remove outdated checks

pull/2561/head
Misha133 2 years ago
parent
commit
49e7eb8105
3 changed files with 0 additions and 20 deletions
  1. +0
    -5
      src/Discord.Net.Rest/Entities/Channels/RestTextChannel.cs
  2. +0
    -10
      src/Discord.Net.Rest/Entities/Channels/ThreadHelper.cs
  3. +0
    -5
      src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs

+ 0
- 5
src/Discord.Net.Rest/Entities/Channels/RestTextChannel.cs View File

@@ -257,11 +257,6 @@ namespace Discord.Rest
/// </param>
/// <param name="autoArchiveDuration">
/// The duration on which this thread archives after.
/// <para>
/// <b>Note: </b> Options <see cref="ThreadArchiveDuration.OneWeek"/> and <see cref="ThreadArchiveDuration.ThreeDays"/>
/// are only available for guilds that are boosted. You can check in the <see cref="IGuild.Features"/> to see if the
/// guild has the <b>THREE_DAY_THREAD_ARCHIVE</b> and <b>SEVEN_DAY_THREAD_ARCHIVE</b>.
/// </para>
/// </param>
/// <param name="message">The message which to start the thread from.</param>
/// <param name="options">The options to be used when sending the request.</param>


+ 0
- 10
src/Discord.Net.Rest/Entities/Channels/ThreadHelper.cs View File

@@ -14,16 +14,6 @@ namespace Discord.Rest
public static async Task<Model> 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");



+ 0
- 5
src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs View File

@@ -107,11 +107,6 @@ namespace Discord.WebSocket
/// </param>
/// <param name="autoArchiveDuration">
/// The duration on which this thread archives after.
/// <para>
/// <b>Note: </b> Options <see cref="ThreadArchiveDuration.OneWeek"/> and <see cref="ThreadArchiveDuration.ThreeDays"/>
/// are only available for guilds that are boosted. You can check in the <see cref="IGuild.Features"/> to see if the
/// guild has the <b>THREE_DAY_THREAD_ARCHIVE</b> and <b>SEVEN_DAY_THREAD_ARCHIVE</b>.
/// </para>
/// </param>
/// <param name="message">The message which to start the thread from.</param>
/// <param name="options">The options to be used when sending the request.</param>


Loading…
Cancel
Save