forked from embee/woomy
No longer complains about ratelimits randomly
This commit is contained in:
parent
0fc8b2bd66
commit
7c6921b844
1 changed files with 8 additions and 8 deletions
|
@ -131,13 +131,6 @@ module.exports = async (client, message) => {
|
|||
};
|
||||
};
|
||||
|
||||
if (commandRanRecently.has(message.author.id)) {
|
||||
return message.channel.send(
|
||||
`<:wait:467115775849922570> You are being ratelimited. Please try again in 2 seconds.`
|
||||
)
|
||||
.then(m => m.delete(2000));
|
||||
};
|
||||
|
||||
const prefixMention = new RegExp(`^<@!?${client.user.id}>( |)$`);
|
||||
|
||||
if (message.content.match(prefixMention)) {
|
||||
|
@ -152,6 +145,13 @@ module.exports = async (client, message) => {
|
|||
|
||||
if (!cmd) return;
|
||||
|
||||
if (commandRanRecently.has(message.author.id)) {
|
||||
return message.channel.send(
|
||||
`<:wait:467115775849922570> You are being ratelimited. Please try again in 2 seconds.`
|
||||
)
|
||||
.then(m => m.delete(2000));
|
||||
};
|
||||
|
||||
if (!perms.has('SEND_MESSAGES')) {
|
||||
return message.author.send(`<:error:466995152976871434> I don't have permission to speak in **#${message.channel.name}**, Please ask a moderator to give me the send messages permission!`);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue