mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
fix: .com default
This commit is contained in:
1 parent
3eca299b1a
commit
01b5ec9bc2
2 files changed
+7
-5
No files matched your search
@@ -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')}\`\`\``,
|
||||
),
|
||||
],
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user