mirror of
https://github.com/System-End/Discord-Bot.git
synced 2026-04-19 22:05:15 +00:00
Stop if no error.stack
This commit is contained in:
parent
b6e1a2eae4
commit
8d03b65a60
1 changed files with 1 additions and 0 deletions
|
|
@ -187,6 +187,7 @@ process.on('unhandledRejection', error => {
|
|||
console.error('Unhandled promise rejection:', error);
|
||||
if (error) if (error.length > 950) error = error.slice(0, 950) + '... view console for details';
|
||||
if (error.stack) if (error.stack.length > 950) error.stack = error.stack.slice(0, 950) + '... view console for details';
|
||||
if(!error.stack) return
|
||||
const embed = new Discord.EmbedBuilder()
|
||||
.setTitle(`🚨・Unhandled promise rejection`)
|
||||
.addFields([
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue