mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-23 10:02:05 +02:00
Fix
This commit is contained in:
@@ -99,14 +99,14 @@ module.exports = class PhoneCall {
|
|||||||
this.setTimeout();
|
this.setTimeout();
|
||||||
if (!this.client.isOwner(msg.author)) {
|
if (!this.client.isOwner(msg.author)) {
|
||||||
const ratelimit = this.ratelimitMeters.get(msg.author.id);
|
const ratelimit = this.ratelimitMeters.get(msg.author.id);
|
||||||
if (!ratelimit) ratelimit.set(msg.author.id, 1);
|
if (!ratelimit) this.ratelimitMeters.set(msg.author.id, 1);
|
||||||
if (ratelimit > 2) {
|
if (ratelimit > 2) {
|
||||||
this.cooldown.add(msg.author.id);
|
this.cooldown.add(msg.author.id);
|
||||||
setTimeout(() => this.cooldown.delete(msg.author.id), 10000);
|
setTimeout(() => this.cooldown.delete(msg.author.id), 10000);
|
||||||
ratelimit.set(msg.author.id, 0);
|
this.ratelimitMeters.set(msg.author.id, 0);
|
||||||
} else {
|
} else {
|
||||||
ratelimit.set(msg.author.id, ratelimit + 1);
|
this.ratelimitMeters.set(msg.author.id, ratelimit + 1);
|
||||||
setTimeout(() => ratelimit.set(msg.author.id, 0), 5000);
|
setTimeout(() => this.ratelimitMeters.set(msg.author.id, 0), 5000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const attachments = hasImage ? msg.attachments.map(a => a.url).join('\n') : null;
|
const attachments = hasImage ? msg.attachments.map(a => a.url).join('\n') : null;
|
||||||
|
|||||||
Reference in New Issue
Block a user