mirror of
https://github.com/thaldrin/thaldrin.git
synced 2024-08-14 23:57:21 +00:00
start with language files
This commit is contained in:
parent
6aa23685a7
commit
1b0f236fcc
2 changed files with 15 additions and 2 deletions
|
@ -5,6 +5,7 @@ import supabase from "../utils/database";
|
||||||
import { Server, Usage } from "../utils/types";
|
import { Server, Usage } from "../utils/types";
|
||||||
import config from "../../config";
|
import config from "../../config";
|
||||||
import { Commands, Shortlink, SourceFinder } from "../utils/wrapper.features";
|
import { Commands, Shortlink, SourceFinder } from "../utils/wrapper.features";
|
||||||
|
import lingua from "../utils/lingua";
|
||||||
|
|
||||||
export = {
|
export = {
|
||||||
name: "message",
|
name: "message",
|
||||||
|
@ -63,10 +64,16 @@ export = {
|
||||||
client.cooldowns.set(cmd.name, new Collection())
|
client.cooldowns.set(cmd.name, new Collection())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const ctx = {
|
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
6
src/utils/lingua.ts
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
import Language from "../../../lingua/index"
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
"en_US": Language.en_US
|
||||||
|
}
|
Loading…
Reference in a new issue