@ayanaware/bentocord
Version:
Bentocord is a Bento plugin designed to rapidly build fully functional Discord Bots.
17 lines • 689 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.UserSuppressor = void 0;
const SuppressorType_1 = require("../constants/SuppressorType");
class UserSuppressor {
constructor() {
this.suppressor = SuppressorType_1.SuppressorType.USER;
}
async suppress(ctx, option, userIds) {
if (!Array.isArray(userIds))
return false;
const message = await ctx.formatTranslation('BENTOCORD_SUPPRESSOR_USER_DENIED', {}, 'You are not allowed to execute this command.');
return userIds.includes(ctx.userId) ? false : message;
}
}
exports.UserSuppressor = UserSuppressor;
//# sourceMappingURL=UserSuppressor.js.map