You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added `Command#parseConstructorPreConditions`.
Added `Command#parseConstructorPreConditionsRunIn`.
Added `Command#parseConstructorPreConditionsNsfw`.
Added `Command#parseConstructorPreConditionsRequiredClientPermissions`.
Added `Command#parseConstructorPreConditionsCooldown`.
Added `CommandPreConditions.Permissions`.
Added `CommandOptions.cooldownScope`.
Added `CommandOptions.requiredClientPermissions`.
Added `Preconditions` interface, this strict types all precondition names and contexts.
Added `PreconditionContainerArray#append`.
Added `SimplePreconditionSingleResolvableDetails`.
Fixed cooldown precondition not working when defining alias properties from `Command`.
BREAKING CHANGE: Changed `Command#preconditions` to `PreconditionContainerArray`.
BREAKING CHANGE: Removed `Command#resolveConstructorPreConditions`.
BREAKING CHANGE: Renamed `CommandOptions.cooldownBucket` to `cooldownLimit`.
BREAKING CHANGE: Renamed `CommandOptions.cooldownDuration` to `cooldownDelay`.
BREAKING CHANGE: Renamed `BucketType` to `BucketScope`.
BREAKING CHANGE: Changed `PreconditionSingleResolvableDetails` to take a type parameter.
BREAKING CHANGE: Changed `PreconditionSingleResolvable` to use `Preconditions`'s type.
BREAKING CHANGE: Renamed `CooldownContext.bucketType` to `scope`.
* Sets the bucket of the cool-down, if set to a non-zero value alongside {@link CommandOptions.cooldownDuration}, the `Cooldown` precondition will be added to the list.
279
+
* The amount of entries the cooldown can have before filling up, if set to a non-zero value alongside {@link CommandOptions.cooldownDelay}, the `Cooldown` precondition will be added to the list.
231
280
* @since 2.0.0
232
281
* @default 1
233
282
*/
234
-
cooldownBucket?: number;
283
+
cooldownLimit?: number;
284
+
285
+
/**
286
+
* The time in milliseconds for the cooldown entries to reset, if set to a non-zero value alongside {@link CommandOptions.cooldownLimit}, the `Cooldown` precondition will be added to the list.
287
+
* @since 2.0.0
288
+
* @default 0
289
+
*/
290
+
cooldownDelay?: number;
291
+
292
+
/**
293
+
* The scope of the cooldown entries.
294
+
* @since 2.0.0
295
+
* @default BucketScope.User
296
+
*/
297
+
cooldownScope?: BucketScope;
235
298
236
299
/**
237
-
* Sets the duration of the tickets in the cool-down, if set to a non-zero value alongside {@link CommandOptions.cooldownBucket}, the `Cooldown` precondition will be added to the list.
300
+
* The required permissions for the client.
238
301
* @since 2.0.0
239
302
* @default 0
240
303
*/
241
-
cooldownDuration?: number;
304
+
requiredClientPermissions?: PermissionResolvable;
242
305
243
306
/**
244
307
* The channels the command should run in. If set to `null`, no precondition entry will be added. Some optimizations are applied when given an array to reduce the amount of preconditions run (e.g. `'text'` and `'news'` becomes `'guild'`, and if both `'dm'` and `'guild'` are defined, then no precondition entry is added as it runs in all channels).
0 commit comments