aboutsummaryrefslogtreecommitdiff
path: root/Commands/join.js
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2024-02-13 22:35:50 -0500
committerAndrew Lee <alee14498@protonmail.com>2024-02-13 23:39:19 -0500
commit72ea1090753ccca3c5573801ae0b0a4439e1b736 (patch)
treebb3ff6e00572d111ddc1af0a864df90208c63840 /Commands/join.js
parent3d4f5061d402b44218cdfd351f39317d5f8ecd11 (diff)
downloadDLAP-72ea1090753ccca3c5573801ae0b0a4439e1b736.tar.gz
DLAP-72ea1090753ccca3c5573801ae0b0a4439e1b736.tar.bz2
DLAP-72ea1090753ccca3c5573801ae0b0a4439e1b736.zip
Fully working i18n (hopefully); Docker on walkthrough
Diffstat (limited to 'Commands/join.js')
-rw-r--r--Commands/join.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/Commands/join.js b/Commands/join.js
index e9bac9b..2f513cf 100644
--- a/Commands/join.js
+++ b/Commands/join.js
@@ -23,17 +23,18 @@ import { SlashCommandBuilder } from 'discord.js';
import { voiceInit } from '../AudioBackend/VoiceInitialization.js';
import { PermissionFlagsBits } from 'discord-api-types/v10';
import { readFileSync } from 'node:fs';
+import i18next from '../Utilities/i18n.js';
const { djRole, ownerID } = JSON.parse(readFileSync('./config.json', 'utf-8'));
-
+const t = i18next.t;
export default {
data: new SlashCommandBuilder()
.setName('join')
.setDescription('Joins voice chat'),
async execute(interaction, bot) {
- if (!interaction.member.voice.channel) return await interaction.reply({ content: 'You need to be in a voice channel to use this command.', ephemeral: true });
- if (!interaction.member.roles.cache.has(djRole) && interaction.user.id !== ownerID && !interaction.memberPermissions.has(PermissionFlagsBits.ManageGuild)) return interaction.reply({ content: 'You need a specific role to execute this command', ephemeral: true });
+ if (!interaction.member.voice.channel) return await interaction.reply({ content: t('voicePermission'), ephemeral: true });
+ if (!interaction.member.roles.cache.has(djRole) && interaction.user.id !== ownerID && !interaction.memberPermissions.has(PermissionFlagsBits.ManageGuild)) return interaction.reply({ content: t('rolePermission'), ephemeral: true });
- await interaction.reply({ content: 'Joining voice channel', ephemeral: true });
+ await interaction.reply({ content: t('joinVoice'), ephemeral: true });
return await voiceInit(bot);
}
};