diff --git a/src/commands/misc/NameAvailabile.ts b/src/commands/misc/NameAvailabile.ts index abb70f1..56e5c0a 100644 --- a/src/commands/misc/NameAvailabile.ts +++ b/src/commands/misc/NameAvailabile.ts @@ -15,7 +15,7 @@ class NameAvailableCommand extends CommandBase { this.getBotInstance().getMineflayerInstance().chat("This name is available."); } else if (status == 200) { const cachedAt = new Date(data.data.player.meta.cached_at); - this.getBotInstance().getMineflayerInstance().chat(`[${ cachedAt.toLocaleString() }] ${ data.data.player.username } is unavailable.`); + this.getBotInstance().getMineflayerInstance().chat(`[${cachedAt.toLocaleString()}] ${data.data.player.username} is unavailable.`); } else { this.getBotInstance().getMineflayerInstance().chat(`There was an error with this request, please try again later. Code: ${status} | Response: ${data}`); } diff --git a/src/discord/RestartBot.ts b/src/discord/RestartBot.ts index b4a469d..afed609 100644 --- a/src/discord/RestartBot.ts +++ b/src/discord/RestartBot.ts @@ -1,9 +1,10 @@ import { ChatInputCommandInteraction, Client } from "discord.js"; +import { exit } from "process"; const RestartBot = async (client: Client, interaction: ChatInputCommandInteraction): Promise => { if (interaction.commandName == "restart") { // This type of restart is designed to be used with PM2. - process.exitCode = 0; + exit(0); } };