[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

@@ -25,6 +25,8 @@ namespace Discord.WebSocket
public virtual int SlowModeInterval { get; private set; }
/// <inheritdoc />
public ulong? CategoryId { get; private set; }
/// <inheritdoc />
public int DefaultSlowModeInterval { get; private set; }
/// <summary>
/// Gets the parent (category) of this channel in the guild's channel list.
/// </summary>
@@ -81,6 +83,8 @@ namespace Discord.WebSocket
DefaultArchiveDuration = model.AutoArchiveDuration.Value;
else
DefaultArchiveDuration = ThreadArchiveDuration.OneDay;
DefaultSlowModeInterval = model.ThreadRateLimitPerUser.GetValueOrDefault(0);
// basic value at channel creation. Shouldn't be called since guild text channels always have this property
}