aboutsummaryrefslogtreecommitdiff
path: root/Commands/shutdown.js
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2024-02-17 00:07:31 -0500
committerGitHub <noreply@github.com>2024-02-17 00:07:31 -0500
commit214a83c0f696ac731c54b00bf7503f87e497afa6 (patch)
tree15d57b08e69d19fb4c2f3effb9937aec8d042bdc /Commands/shutdown.js
parentb29ab06623fd24cfc2a611bdd658b4d2ef934335 (diff)
parentc848f1d90fef40ffa81915d7dd875a2ee6d6c8d5 (diff)
downloadDLAP-214a83c0f696ac731c54b00bf7503f87e497afa6.tar.gz
DLAP-214a83c0f696ac731c54b00bf7503f87e497afa6.tar.bz2
DLAP-214a83c0f696ac731c54b00bf7503f87e497afa6.zip
Merge pull request #17 from Alee14/testing
Merging testing branch
Diffstat (limited to 'Commands/shutdown.js')
-rw-r--r--Commands/shutdown.js7
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);
}
};