forked from Supositware/Haha-Yes
Don't apply rate limit to bot owner
This commit is contained in:
parent
59bf0b9430
commit
fb4db75f09
1 changed files with 7 additions and 0 deletions
|
@ -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…
Reference in a new issue