From 8c81aadddea65eef415f5b84986db21eff1fb20f Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 26 Mar 2023 23:44:05 -0400 Subject: 2023 update; Started to work on i18n; Readded voting --- bot.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bot.js') diff --git a/bot.js b/bot.js index c1444b4..e6bd3c0 100644 --- a/bot.js +++ b/bot.js @@ -21,9 +21,11 @@ import { Client, Events, GatewayIntentBits, EmbedBuilder, Collection, version, InteractionType } from 'discord.js'; import { voiceInit } from './AudioBackend/VoiceInitialization.js'; import { readdirSync, readFileSync } from 'node:fs'; +import i18next from './Utilities/i18n.js'; // import config from './config.json' assert { type: 'json' } Not supported by ESLint yet const { token, statusChannel, voiceChannel, djRole, ownerID, shuffle, repeat, presenceActivity, activityType } = JSON.parse(readFileSync('./config.json', 'utf-8')); const bot = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildVoiceStates] }); +const t = i18next.t; bot.login(token); // Slash Command Handler @@ -37,8 +39,8 @@ for (const file of commandFiles) { } bot.once(Events.ClientReady, async() => { - console.log('Bot is ready!'); - console.log(`Logged in as ${bot.user.tag}!`); + console.log(t('botReady')); + console.log(t('loggedIn', { bot: bot.user.tag })); console.log(`Running on Discord.JS ${version}`); console.log(`Voice Channel: ${voiceChannel}`); console.log(`Status Channel: ${statusChannel}`); -- cgit v1.2.3