Don't apply rate limit to bot owner

Slash-V14
Supositware 1 year ago
parent 59bf0b9430
commit fb4db75f09

@ -1,4 +1,6 @@
const ratelimit = {};
const { ownerId } = process.env;
import db from '../models/index.js';
export default {
@ -8,6 +10,11 @@ function check(user, commandName, commands) {
const userID = user.id;
const userTag = user.tag;
// Don't apply the rate limit to bot owner
if (userID === ownerId) {
return false;
}
if (!ratelimit[userID]) {
ratelimit[userID] = {};
}

Loading…
Cancel
Save