Pibbles
Pibbles
Explore posts from servers
DIdiscord.js - Imagine ❄
Created by Pibbles on 12/19/2024 in #djs-questions
Understanding Error
So thank you for getting me going in the direction i needed with one question 😄 If I change to this
process.on('unhandledRejection', (error) => {
this.logger.error(error);
});
process.on('unhandledRejection', (error) => {
this.logger.error(error);
});
I get the extra stack trace. So this now gets into the realm of still learning, and if I need to go ask in another server I will, but if I want to wrap the error so that it logs as "Unhandled rejection", what do I need to do to ensure all the trace stays? For reference so you do not have to go back through everything, here is my current code, that does not work.
process.on('unhandledRejection', (error) => {
client.logger.error(
new Error('Unhandled promise rejection:', { cause: error }),
);
});
process.on('unhandledRejection', (error) => {
client.logger.error(
new Error('Unhandled promise rejection:', { cause: error }),
);
});
6 replies
DIdiscord.js - Imagine ❄
Created by Pibbles on 12/19/2024 in #djs-questions
Understanding Error
I just noticed that the one in my orginial post is missing access error, which is really self explanitory, but again no trace. Here is an unkown interaction.
Error: Unhandled promise rejection:
at <anonymous> (/home/azureuser/Nibbles/node_modules/@sparkbot/logger-plugin-interface/index.ts:32:9)
caused by: Error: Unknown interaction
at new DiscordAPIError (/home/azureuser/Nibbles/node_modules/@discordjs/rest/dist/index.js:583:5)
at <anonymous> (/home/azureuser/Nibbles/node_modules/@discordjs/rest/dist/index.js:730:17)
at processTicksAndRejections (:12:39)
Error: Unhandled promise rejection:
at <anonymous> (/home/azureuser/Nibbles/node_modules/@sparkbot/logger-plugin-interface/index.ts:32:9)
caused by: Error: Unknown interaction
at new DiscordAPIError (/home/azureuser/Nibbles/node_modules/@discordjs/rest/dist/index.js:583:5)
at <anonymous> (/home/azureuser/Nibbles/node_modules/@discordjs/rest/dist/index.js:730:17)
at processTicksAndRejections (:12:39)
The only thing I can figgure out is that somewhere in the logging setup, whether it is the unhandled handler or perhaps becuase I am doing that process.on inside a plugin package, or whatever. Just to confirm...there should be more to this error stack correct? As long as I know that, then I know that I need to go dig into my logging setup.
6 replies
DIdiscord.js - Imagine ❄
Created by Pibbles on 12/19/2024 in #djs-questions
Understanding Error
I am using pino and this ....
process.on('unhandledRejection', (error) => {
client.logger.error(
new Error('Unhandled promise rejection:', { cause: error }),
);
process.exit(1);
});
process.on('unhandledRejection', (error) => {
client.logger.error(
new Error('Unhandled promise rejection:', { cause: error }),
);
process.exit(1);
});
6 replies
DIdiscord.js - Imagine ❄
Created by Pibbles on 10/13/2024 in #djs-questions
Is fetching all threads safe?
Regex on thread titles, but yeah as I have thought about I have considered the db route
5 replies
DIdiscord.js - Imagine ❄
Created by Pibbles on 10/6/2024 in #djs-questions
Posting img with REST
Hey, thank you much, that was not to big a deal once you gave me the direction to go. Really appricate it.
5 replies
DIdiscord.js - Imagine ❄
Created by Pibbles on 10/6/2024 in #djs-questions
Posting img with REST
Ok, I will go look into that.
5 replies
DIdiscord.js - Imagine ❄
Created by Pibbles on 8/2/2024 in #djs-questions
Troubleshoot Memory Issues
ok
7 replies
DIdiscord.js - Imagine ❄
Created by Pibbles on 8/2/2024 in #djs-questions
Troubleshoot Memory Issues
684
7 replies
DIdiscord.js - Imagine ❄
Created by Pibbles on 8/2/2024 in #djs-questions
Troubleshoot Memory Issues
1 guild, ` [11114676.411569] Out of memory: Killed process 651420 (bun) total-vm:74235776kB, anon-rss:162544kB, file-rss:0kB, shmem-rss:0kB, UID:1000 pgtables:688kB oom_score_adj:0 [9987737.521653] Out of memory: Killed process 528010 (bun) total-vm:74391420kB, anon-rss:190984kB, file-rss:0kB, shmem-rss:0kB, UID:1000 pgtables:724kB oom_score_adj:0 [198711.105407] Out of memory: Killed process 11122 (xo) total-vm:12562500kB, anon-rss:369976kB, file-rss:0kB, shmem-rss:0kB, UID:1000 pgtables:9544kB oom_score_adj:0
7 replies
DIdiscord.js - Imagine ❄
Created by Pibbles on 8/2/2024 in #djs-questions
Troubleshoot Memory Issues
GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMessageReactions, GatewayIntentBits.MessageContent
7 replies
DIdiscord.js - Imagine ❄
Created by Pibbles on 4/13/2024 in #djs-questions
Comparing commands
Ohh crap, I totaly missed that when I read it. Wow, perfect. Thank you!
16 replies
DIdiscord.js - Imagine ❄
Created by Pibbles on 4/13/2024 in #djs-questions
Comparing commands
Thank you much!
16 replies
DIdiscord.js - Imagine ❄
Created by Pibbles on 4/13/2024 in #djs-questions
Comparing commands
THen for delete just have to determine that through program and call delete method
16 replies
DIdiscord.js - Imagine ❄
Created by Pibbles on 4/13/2024 in #djs-questions
Comparing commands
I think what worries me is that the PUT API overwrite all commands, and I assuem the set() method of ApplicationCommandManger uses PUT. Ohh, I got it. Use the create() method, which will either create or update.
16 replies
DIdiscord.js - Imagine ❄
Created by Pibbles on 4/13/2024 in #djs-questions
Comparing commands
Just to be clear...are you refering to using the REST methods or the ApplicationCommandManager methods. And you are saying just send it all and anything new will be created, anything removed will be deleted, and anything updated will be updated. And the only limit will be new?
16 replies
DIdiscord.js - Imagine ❄
Created by Pibbles on 4/13/2024 in #djs-questions
Comparing commands
There is a hard limit on command creations each day.
16 replies
DIdiscord.js - Imagine ❄
Created by Pibbles on 3/27/2024 in #djs-questions
Hot loading
thank you!
6 replies