[Feature] Default thread ratelimit in guild text channels (#2622)

* initial commit

* mocked bruh
This commit is contained in:
Misha133
2023-03-31 14:22:00 +03:00
committed by GitHub
parent 529fe3d969
commit f9c8530a89
10 changed files with 41 additions and 18 deletions

View File

@@ -28,21 +28,6 @@ public class ForumChannelProperties : TextChannelProperties
/// <exception cref="ArgumentOutOfRangeException">Thrown if the value does not fall within [0, 21600].</exception>
public Optional<int> ThreadCreationInterval { get; set; }
/// <summary>
/// Gets or sets the default slow-mode for threads in this channel.
/// </summary>
/// <remarks>
/// Setting this value to anything above zero will require each user to wait X seconds before
/// sending another message; setting this value to <c>0</c> will disable slow-mode for child threads.
/// <note>
/// Users with <see cref="Discord.ChannelPermission.ManageMessages"/> or
/// <see cref="ChannelPermission.ManageChannels"/> will be exempt from slow-mode.
/// </note>
/// </remarks>
/// <exception cref="ArgumentOutOfRangeException">Thrown if the value does not fall within [0, 21600].</exception>
public Optional<int> DefaultSlowModeInterval { get; set; }
/// <summary>
/// Gets or sets a collection of tags inside of this forum channel.
/// </summary>

View File

@@ -35,6 +35,15 @@ namespace Discord
/// </returns>
int SlowModeInterval { get; }
/// <summary>
/// Gets the current default slow-mode delay for threads in this channel.
/// </summary>
/// <returns>
/// An <see cref="int"/> representing the time in seconds required before the user can send another
/// message; <c>0</c> if disabled.
/// </returns>
int DefaultSlowModeInterval { get; }
/// <summary>
/// Gets the default auto-archive duration for client-created threads in this channel.
/// </summary>

View File

@@ -45,5 +45,19 @@ namespace Discord
/// </summary>
public Optional<ThreadArchiveDuration> AutoArchiveDuration { get; set; }
/// <summary>
/// Gets or sets the default slow-mode for threads in this channel.
/// </summary>
/// <remarks>
/// Setting this value to anything above zero will require each user to wait X seconds before
/// sending another message; setting this value to <c>0</c> will disable slow-mode for child threads.
/// <note>
/// Users with <see cref="Discord.ChannelPermission.ManageMessages"/> or
/// <see cref="ChannelPermission.ManageChannels"/> will be exempt from slow-mode.
/// </note>
/// </remarks>
/// <exception cref="ArgumentOutOfRangeException">Thrown if the value does not fall within [0, 21600].</exception>
public Optional<int> DefaultSlowModeInterval { get; set; }
}
}