mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-21 14:04:38 +02:00
Owner ignores phone cooldown
This commit is contained in:
@@ -66,12 +66,14 @@ module.exports = class PhoneCall {
|
|||||||
}
|
}
|
||||||
return this.hangup(channel);
|
return this.hangup(channel);
|
||||||
}
|
}
|
||||||
if (this.cooldown.has(msg.author.id)) {
|
if (this.cooldown.has(msg.author.id) && !this.client.isOwner(msg.author)) {
|
||||||
return this.recipient.send(`☎️ ${msg.author}, please wait **5** seconds between messages!`);
|
return this.recipient.send(`☎️ ${msg.author}, please wait **5** seconds between messages!`);
|
||||||
}
|
}
|
||||||
this.setTimeout();
|
this.setTimeout();
|
||||||
this.cooldown.add(msg.author.id);
|
if (!this.client.isOwner(msg.author)) {
|
||||||
setTimeout(() => this.cooldown.delete(msg.author.id), 5000);
|
this.cooldown.add(msg.author.id);
|
||||||
|
setTimeout(() => this.cooldown.delete(msg.author.id), 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;
|
||||||
if (!hasText && hasImage) return channel.send(`☎️ **${msg.author.tag}:**\n${attachments}`);
|
if (!hasText && hasImage) return channel.send(`☎️ **${msg.author.tag}:**\n${attachments}`);
|
||||||
if (!hasText && hasEmbed) return channel.send(`☎️ **${msg.author.tag}** sent an embed.`);
|
if (!hasText && hasEmbed) return channel.send(`☎️ **${msg.author.tag}** sent an embed.`);
|
||||||
|
|||||||
Reference in New Issue
Block a user