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 /Commands/shutdown.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 'Commands/shutdown.js')
| -rw-r--r-- | Commands/shutdown.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Commands/shutdown.js b/Commands/shutdown.js index eefbab3..6e26f83 100644 --- a/Commands/shutdown.js +++ b/Commands/shutdown.js @@ -22,14 +22,17 @@ import { SlashCommandBuilder } from 'discord.js'; import { stopBot } from '../AudioBackend/Shutdown.js'; import { readFileSync } from 'node:fs'; +import i18next from '../Utilities/i18n.js'; + +const t = i18next.t; const { ownerID } = JSON.parse(readFileSync('./config.json', 'utf-8')); export default { data: new SlashCommandBuilder() .setName('shutdown') .setDescription('Powers off the bot'), async execute(interaction, bot) { - if (interaction.user.id !== ownerID) return interaction.reply({ content: 'You need to be the creator of this bot to execute this command', ephemeral: true }); - await interaction.reply({ content: 'Powering off...', ephemeral: true }); + if (interaction.user.id !== ownerID) return interaction.reply({ content: t('creatorPermission'), ephemeral: true }); + await interaction.reply({ content: t('powerOff', { bot: bot.user.username }), ephemeral: true }); return await stopBot(bot, interaction); } }; |
