start with language files

This commit is contained in:
Lio Young 2021-04-08 20:31:30 +02:00
parent 6aa23685a7
commit 1b0f236fcc
No known key found for this signature in database
GPG Key ID: 789795A11879E169
2 changed files with 15 additions and 2 deletions

View File

@ -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
// )
}
}

6
src/utils/lingua.ts Normal file
View File

@ -0,0 +1,6 @@
import Language from "../../../lingua/index"
export default {
"en_US": Language.en_US
}