diff --git a/src/behaviors/error.ts b/src/behaviors/error.ts index 5e8f9624e..eeac3ec58 100644 --- a/src/behaviors/error.ts +++ b/src/behaviors/error.ts @@ -7,7 +7,7 @@ import isDev from '../utilities/isDev.js'; const PROCESS_ERROR_EVENTS = ['uncaughtException']; const CLIENT_ERROR_EVENTS = ['error']; -export function handleError(error: Error, client: Client) { +export function handleError(error: Error, client: Client, command?: string) { console.error(error); ( @@ -20,7 +20,9 @@ export function handleError(error: Error, client: Client) { .setTitle(`${client.user?.username} ran into an error`) .setColor(NEGATIVE_COLOR) .setDescription( - `\`\`\`${error.name}\n${error.message}\n${error.stack}\n${error.cause}\`\`\``, + `\`\`\`${[command, error.name, error.message, error.stack] + .filter((item) => item !== undefined) + .join('\n\n')}\`\`\``, ), ], }); diff --git a/src/commands/inactive.ts b/src/commands/inactive.ts index 0a1b25bbc..4787a3787 100644 --- a/src/commands/inactive.ts +++ b/src/commands/inactive.ts @@ -13,7 +13,7 @@ const DEFAULT_THRESHOLD = 7; export default { inProduction: true, - inDevelopment: false, + inDevelopment: true, inPublic: true, command: new SlashCommandBuilder() @@ -45,13 +45,13 @@ export default { const time = new Date().getTime() / 1000; getWargamingResponse( - `https://api.wotblitz.com/wotb/clans/info/?application_id=${args['wargaming-application-id']}&clan_id=${clan.clan_id}`, + `https://api.wotblitz.${server}/wotb/clans/info/?application_id=${args['wargaming-application-id']}&clan_id=${clan.clan_id}`, interaction, async (clanInfo) => { const memberIds = clanInfo[clan.clan_id].members_ids; getWargamingResponse( - `https://api.wotblitz.com/wotb/account/info/?application_id=${ + `https://api.wotblitz.${server}/wotb/account/info/?application_id=${ args['wargaming-application-id'] }&account_id=${memberIds.join(',')}`, interaction,