From 843f4a78c9813d6ad7f0d60e985519a2ad87b56c Mon Sep 17 00:00:00 2001 From: Erit Islami Date: Tue, 19 Sep 2023 12:53:39 +0200 Subject: [PATCH] :fire: Remove prefix from config (not used) --- commands/play.ts | 2 +- commands/search.ts | 2 +- config.json.example | 1 - interfaces/Config.ts | 1 - structs/Bot.ts | 2 +- utils/config.ts | 1 - 6 files changed, 3 insertions(+), 6 deletions(-) diff --git a/commands/play.ts b/commands/play.ts index 88b935472..88f32ac27 100644 --- a/commands/play.ts +++ b/commands/play.ts @@ -52,7 +52,7 @@ export default { if (playlistPattern.test(url)) { await interaction.editReply("🔗 Link is playlist").catch(console.error); - return bot.slashCommandsMap.get("playlist")!.execute(interaction, 'song'); + return bot.slashCommandsMap.get("playlist")!.execute(interaction, "song"); } let song; diff --git a/commands/search.ts b/commands/search.ts index d3ac52c62..87af158bb 100644 --- a/commands/search.ts +++ b/commands/search.ts @@ -38,7 +38,7 @@ export default { } if (!results || !results[0]) { - interaction.editReply({ content: i18n.__("search.noResults") }) + interaction.editReply({ content: i18n.__("search.noResults") }); return; } diff --git a/config.json.example b/config.json.example index 02dea3148..5f7f39c46 100644 --- a/config.json.example +++ b/config.json.example @@ -1,7 +1,6 @@ { "TOKEN": "", "MAX_PLAYLIST_SIZE": 10, - "PREFIX": "/", "PRUNING": false, "LOCALE": "en", "STAY_TIME": 30, diff --git a/interfaces/Config.ts b/interfaces/Config.ts index 3a91d22a8..7d5ad2e8f 100644 --- a/interfaces/Config.ts +++ b/interfaces/Config.ts @@ -1,6 +1,5 @@ export interface Config { TOKEN: string; - PREFIX: string; MAX_PLAYLIST_SIZE: number; PRUNING: boolean; STAY_TIME: number; diff --git a/structs/Bot.ts b/structs/Bot.ts index 5463955ed..f533f6a09 100644 --- a/structs/Bot.ts +++ b/structs/Bot.ts @@ -19,7 +19,7 @@ import { MissingPermissionsException } from "../utils/MissingPermissionsExceptio import { MusicQueue } from "./MusicQueue"; export class Bot { - public readonly prefix = config.PREFIX; + public readonly prefix = "/"; public commands = new Collection(); public slashCommands = new Array(); public slashCommandsMap = new Collection(); diff --git a/utils/config.ts b/utils/config.ts index 0705f147d..cc22ecfe4 100644 --- a/utils/config.ts +++ b/utils/config.ts @@ -8,7 +8,6 @@ try { } catch (error) { config = { TOKEN: process.env.TOKEN || "", - PREFIX: process.env.PREFIX || "!", MAX_PLAYLIST_SIZE: parseInt(process.env.MAX_PLAYLIST_SIZE!) || 10, PRUNING: process.env.PRUNING === "true" ? true : false, STAY_TIME: parseInt(process.env.STAY_TIME!) || 30,