feat: locales #27

Merged
Anri merged 26 commits from lang into main 2022-07-22 11:46:48 +02:00
Showing only changes of commit a819ed0ea8 - Show all commits

View file

@ -4,8 +4,8 @@ import { getLocale } from '../../utils/locales';
export default { export default {
data: (client: Client) => new SlashCommandBuilder() data: (client: Client) => new SlashCommandBuilder()
.setNameLocalizations(getLocale(client, 'ping_name')) .setNameLocalizations(getLocale(client, 'c_ping_name'))
.setDescriptionLocalizations(getLocale(client, 'ping_desc')), .setDescriptionLocalizations(getLocale(client, 'c_ping_desc')),
interaction: async (interaction: CommandInteraction, client: Client) => { interaction: async (interaction: CommandInteraction, client: Client) => {
const loc = client.locales.get(interaction.locale) ?? client.locales.get(client.config.default_lang); const loc = client.locales.get(interaction.locale) ?? client.locales.get(client.config.default_lang);