@ayanaware/bentocord
Version:
Bentocord is a Bento plugin designed to rapidly build fully functional Discord Bots.
19 lines • 850 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.GuildSuppressor = void 0;
const SuppressorType_1 = require("../constants/SuppressorType");
class GuildSuppressor {
constructor() {
this.suppressor = SuppressorType_1.SuppressorType.GUILD;
}
async suppress(ctx, option, guildIds) {
if (!ctx.guildId)
return ctx.formatTranslation('BENTOCORD_SUPPRESSOR_GUILD', {}, 'This command must be executed in a server.');
if (!Array.isArray(guildIds))
return false;
const message = await ctx.formatTranslation('BENTOCORD_SUPPRESSOR_GUILD_DENIED', {}, 'Server is not allowed to execute this command.');
return guildIds.includes(ctx.guildId) ? false : message;
}
}
exports.GuildSuppressor = GuildSuppressor;
//# sourceMappingURL=GuildSuppressor.js.map