@ayanaware/bentocord
Version:
Bentocord is a Bento plugin designed to rapidly build fully functional Discord Bots.
18 lines • 730 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.GuildAdminSuppressor = void 0;
const SuppressorType_1 = require("../constants/SuppressorType");
class GuildAdminSuppressor {
constructor() {
this.suppressor = SuppressorType_1.SuppressorType.GUILD_ADMIN;
}
async suppress(ctx) {
const member = ctx.member;
if (!member)
return false;
const message = await ctx.formatTranslation('BENTOCORD_SUPPRESSOR_GUILD_ADMIN', {}, 'You are not a server administrator.');
return member.permissions.has('administrator') ? false : message;
}
}
exports.GuildAdminSuppressor = GuildAdminSuppressor;
//# sourceMappingURL=GuildAdminSuppressor.js.map