Files
blitzkit/src/core/blitzstars/blitzStarsError.ts
T

28 lines
752 B
TypeScript
Raw Normal View History

2023-05-06 18:03:37 +00:00
import {
CacheType,
ChatInputCommandInteraction,
EmbedBuilder,
} from 'discord.js';
2023-05-19 23:50:24 +00:00
import { NEGATIVE_COLOR } from '../../constants/colors.js';
import { handleError } from '../../events/error.js';
import { client } from '../../index.js';
2023-05-06 18:03:37 +00:00
export default async function blitzStarsError(
interaction: ChatInputCommandInteraction<CacheType>,
error: Error,
command: string,
) {
await interaction.editReply({
embeds: [
new EmbedBuilder()
.setColor(NEGATIVE_COLOR)
.setTitle(`${client.user?.username} ran into an issue`)
.setDescription(
'BlitzStars returned an error. Please try again later.',
),
],
});
console.log(`BlitzStars returned an error`);
2023-06-06 16:50:33 +00:00
handleError(error, command);
2023-05-06 18:03:37 +00:00
}