diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2024-02-13 22:35:50 -0500 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2024-02-13 23:39:19 -0500 |
| commit | 72ea1090753ccca3c5573801ae0b0a4439e1b736 (patch) | |
| tree | bb3ff6e00572d111ddc1af0a864df90208c63840 /bot.js | |
| parent | 3d4f5061d402b44218cdfd351f39317d5f8ecd11 (diff) | |
| download | DLAP-72ea1090753ccca3c5573801ae0b0a4439e1b736.tar.gz DLAP-72ea1090753ccca3c5573801ae0b0a4439e1b736.tar.bz2 DLAP-72ea1090753ccca3c5573801ae0b0a4439e1b736.zip | |
Fully working i18n (hopefully); Docker on walkthrough
Diffstat (limited to 'bot.js')
| -rw-r--r-- | bot.js | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -41,13 +41,13 @@ for (const file of commandFiles) { bot.once(Events.ClientReady, async() => { 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}`); - console.log(`DJ Role: ${djRole}`); - console.log(`Owner ID: ${ownerID}`); - console.log(`Shuffle Enabled: ${shuffle}`); - console.log(`Repeat Enabled: ${repeat}`); + console.log(t('discordVersion', { version })); + console.log(t('voiceChannel', { voiceChannel })); + console.log(t('statusChannel', { statusChannel })); + console.log(t('djRole', { djRole })); + console.log(t('ownerID', { ownerID })); + console.log(t('shuffleEnabled', { shuffle })); + console.log(t('repeatEnabled', { repeat })); // Set bots' presence bot.user.setPresence({ @@ -59,16 +59,16 @@ bot.once(Events.ClientReady, async() => { }); const activity = bot.presence.activities[0]; - console.log(`Updated bot presence to "${activity.name}"`); + console.log(t('presenceSet', { activity: activity.name })); // Send bots' status to channel const readyEmbed = new EmbedBuilder() .setAuthor({ name: bot.user.username, iconURL: bot.user.avatarURL() }) - .setDescription('Starting bot...') + .setDescription(t('startingBot')) .setColor('#0066ff'); const channel = bot.channels.cache.get(statusChannel); - if (!channel) return console.error('The status channel does not exist! Skipping.'); + if (!channel) return console.error(t('statusChannelError')); await channel.send({ embeds: [readyEmbed] }); return await voiceInit(bot); @@ -85,6 +85,6 @@ bot.on(Events.InteractionCreate, async interaction => { await command.execute(interaction, bot); } catch (e) { console.error(e); - await interaction.reply({ content: `There was an error while executing this command...\nShare this to the bot owner or report it to the git repository in \`/about\`\n\nDetails:\`\`\`${e}\`\`\``, ephemeral: true }); + await interaction.reply({ content: t('exception', { e }), ephemeral: true }); } }); |
