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:
@@ -356,6 +356,8 @@ namespace Discord.API
|
||||
Preconditions.NotNull(args, nameof(args));
|
||||
Preconditions.AtLeast(args.Position, 0, nameof(args.Position));
|
||||
Preconditions.NotNullOrEmpty(args.Name, nameof(args.Name));
|
||||
Preconditions.AtLeast(args.SlowMode, 0, nameof(args.SlowMode));
|
||||
Preconditions.AtMost(args.SlowMode, 120, nameof(args.SlowMode));
|
||||
options = RequestOptions.CreateOrClone(options);
|
||||
|
||||
var ids = new BucketIds(channelId: channelId);
|
||||
|
||||
Reference in New Issue
Block a user