api: add slow mode
This adds the following property to ITextChannel - SlowMode (int) The SlowMode field defines the time in seconds users must wait between sending messages; if zero, slow-mode is disabled. Bots are not affected by slow-mode, and as such, no changes need to be made to the REST client's internal ratelimiting. This is strictly a read/write cosmetic property for bots.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#pragma warning disable CS1591
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
@@ -33,6 +33,8 @@ namespace Discord.API
|
||||
public Optional<DateTimeOffset?> LastPinTimestamp { get; set; }
|
||||
[JsonProperty("nsfw")]
|
||||
public Optional<bool> Nsfw { get; set; }
|
||||
[JsonProperty("rate_limit_per_user")]
|
||||
public Optional<int> SlowMode { get; set; }
|
||||
|
||||
//VoiceChannel
|
||||
[JsonProperty("bitrate")]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma warning disable CS1591
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API.Rest
|
||||
@@ -10,5 +10,7 @@ namespace Discord.API.Rest
|
||||
public Optional<string> Topic { get; set; }
|
||||
[JsonProperty("nsfw")]
|
||||
public Optional<bool> IsNsfw { get; set; }
|
||||
[JsonProperty("rate_limit_per_user")]
|
||||
public Optional<int> SlowMode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user