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