chore: corrected mistakes

permalink: http://whatthecommit.com/e3da640ecb1a8202b137447209380f9e
This commit is contained in:
EvolutionX
2023-09-02 11:41:42 +05:30
parent 13da5def53
commit 0812117ba0

View File

@@ -1,8 +1,7 @@
// @ts-nocheck
/**
* @plugin
* Allows you to set cooldowns (or "ratelimits") for commands
* limits user/channel/guild actions,
* Allows you to set cooldowns (or "ratelimits") for commands, limits user/channel/guild actions.
* @author @trueharuu [<@504698587221852172>]
* @version 1.0.0
* @example
@@ -45,7 +44,7 @@ export class ExpiryMap<K, V> extends Map<K, V> {
public readonly expiry: number;
constructor(
expiry: number = Infinity,
iterable: [K, V][] | ReadonlyMap<K, V> = [],
iterable: [K, V][] | ReadonlyMap<K, V> = []
) {
super(iterable);
this.expiry = expiry;
@@ -65,7 +64,7 @@ export const map = new ExpiryMap<string, number>();
function parseCooldown(
location: CooldownLocation,
cooldown: CooldownString,
cooldown: CooldownString
): Cooldown {
const [actions, seconds] = cooldown.split("/").map((s) => Number(s));
@@ -113,7 +112,7 @@ function add(
| [CooldownLocation | keyof typeof CooldownLocation, CooldownString]
| Cooldown
>,
message?: CooldownResponse,
message?: CooldownResponse
) {
const raw = items.map((c) => {
if (!Array.isArray(c)) return c;