diff --git a/src/client/automation.ts b/src/client/automation.ts index 6cdb38a3a..972e6843a 100644 --- a/src/client/automation.ts +++ b/src/client/automation.ts @@ -34,12 +34,12 @@ export class Automation { } } - private pollCheck(p: Poll) { + private pollCheck(p: Poll): void { const poll = new Poll(p); // get methods back if (poll.isTimeout()) { poll.setStatus("ended"); - poll.updateEmbed(this.client).then(() => this.client.polls.delete(poll.id)).catch(() => {}); + poll.updateEmbed(this.client).then(() => this.client.polls.delete(poll.id)); } } } diff --git a/src/client/client.ts b/src/client/client.ts index 74a558a8c..ea1ad12ba 100644 --- a/src/client/client.ts +++ b/src/client/client.ts @@ -126,8 +126,6 @@ export class ExtendedClient extends Client { this.loadComponents(); this.loadEvents(); this.loadCollections(); - - this.automation.start(); }); // I know this restarting stuff kinda sucks but you can't guarantee which one is triggered diff --git a/src/commands/bot/shutdown.ts b/src/commands/bot/shutdown.ts deleted file mode 100644 index 2cd310fcc..000000000 --- a/src/commands/bot/shutdown.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { SlashCommand } from "@interfaces"; -import { SlashCommandBuilder, PermissionFlagsBits } from "discord.js"; -import { ChatInputCommandInteraction, EmbedBuilder } from "@client"; - -export const command: SlashCommand = { - data: new SlashCommandBuilder() - .setName("shutdown") - .setDescription("Shuts down the bot.") - .setDefaultMemberPermissions(PermissionFlagsBits.Administrator), - async execute(interaction: ChatInputCommandInteraction) { - if (!interaction.hasPermission("dev")) return; - await interaction.reply({ - embeds: [new EmbedBuilder().setTitle("Shutting down...")], - }); - return process.exit(); - }, -}; diff --git a/src/helpers/functions/errorHandler.ts b/src/helpers/functions/errorHandler.ts index c8a70ecc3..aa3b133f9 100644 --- a/src/helpers/functions/errorHandler.ts +++ b/src/helpers/functions/errorHandler.ts @@ -123,7 +123,7 @@ export async function errorHandler(client: Client, error: any, type: string) { let eprotoError = false; let description = error.stack; - let codeBlocks = " "; + let codeBlocks = ""; if (error.isAxiosError) { // axios errors are JSON diff --git a/src/helpers/utility/handleJSON.ts b/src/helpers/utility/handleJSON.ts index 7c2973f2c..84b72b9c1 100644 --- a/src/helpers/utility/handleJSON.ts +++ b/src/helpers/utility/handleJSON.ts @@ -43,7 +43,7 @@ export function getData(options: GetOptions) { * @param options data to set */ export function setData(options: SetOptions) { - const folder = path.resolve(__dirname, options.relative_path); + let folder = path.resolve(__dirname, options.relative_path); const file = path.resolve(folder, options.filename); try {