diff --git a/src/events/message.ts b/src/events/message.ts index 5a69e5b..5a10791 100644 --- a/src/events/message.ts +++ b/src/events/message.ts @@ -5,6 +5,7 @@ import supabase from "../utils/database"; import { Server, Usage } from "../utils/types"; import config from "../../config"; import { Commands, Shortlink, SourceFinder } from "../utils/wrapper.features"; +import lingua from "../utils/lingua"; export = { name: "message", @@ -63,10 +64,16 @@ export = { client.cooldowns.set(cmd.name, new Collection()) } - const ctx = { - client, guild: message.guild, message, supabase, config, isDeveloper: config.developers.includes(message.author.id) + client, guild: message.guild, message, channel: message.channel, supabase, config, isDeveloper: config.developers.includes(message.author.id) } + if (ctx.isDeveloper) cmd.AuthorPermissions = "NONE" + + console.log(ctx.isDeveloper) + // if (cmd.nsfw && !ctx.channel.nsfw) return ctx.channel.send( + // lingua["en_US"].CHANNEL_NOT_NSFW + // ) + } } \ No newline at end of file diff --git a/src/utils/lingua.ts b/src/utils/lingua.ts new file mode 100644 index 0000000..8d773e3 --- /dev/null +++ b/src/utils/lingua.ts @@ -0,0 +1,6 @@ +import Language from "../../../lingua/index" + + +export default { + "en_US": Language.en_US +} \ No newline at end of file