UNPKG

@ayanaware/bentocord

Version:

Bentocord is a Bento plugin designed to rapidly build fully functional Discord Bots.

21 lines 800 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GuildOwnerSuppressor = void 0; const SuppressorType_1 = require("../constants/SuppressorType"); class GuildOwnerSuppressor { constructor() { this.suppressor = SuppressorType_1.SuppressorType.GUILD_OWNER; } async suppress(ctx) { const guild = ctx.guild; if (!guild) return false; // Bot owner bypass if (await ctx.isBotOwner()) return false; const message = await ctx.formatTranslation('BENTOCORD_SUPPRESSOR_GUILD_OWNER', {}, 'You are not the server owner.'); return guild.ownerID === ctx.userId ? false : message; } } exports.GuildOwnerSuppressor = GuildOwnerSuppressor; //# sourceMappingURL=GuildOwnerSuppressor.js.map