SIA
Sapphire - Imagine a frameworkdisclosuure
UserError listener not catching all errors
I am running an imported function in my command, and calling UserError in this file and when I do, it is not caught by the listener, and my bot crashes.
Error Source: https://github.com/cosigyn/Clanware-V3/blob/master/src/mods.mjs#L229
Command: https://github.com/cosigyn/Clanware-V3/blob/master/src/commands/general/affiliate.mjs
GitHub
Clanware-V3/affiliate.mjs at master · cosigyn/Clanware-V3
Contribute to cosigyn/Clanware-V3 development by creating an account on GitHub.
GitHub
Clanware-V3/mods.mjs at master · cosigyn/Clanware-V3
Contribute to cosigyn/Clanware-V3 development by creating an account on GitHub.
F
Favna•392d ago
At a glance I wouldn't be surprised if it's related to the
return new Promise
breaking the scope. It's definitely also unnecessary syntax because async functions always already return promises, you don't need to instantiate one at all. In fact, by doing so you create a promise within a promise.
Other than that, also consider all of the same the last time you had this issue. Thoroughly sanitize check all your code.
Lastly, you should read up on proper JSDoc syntax because the way you define parameters now in those doc comments is not really useful. https://dev.to/sumansarkar/how-to-use-jsdoc-annotations-with-vscode-for-intellisense-7coDEV Community
How to use JsDoc annotations with VsCode for intellisense - PART 1 ...
The Problem 🤦♂️ For many of us JavaScript devs, we love the fact that TypeScript exists....
Welcome to the Sapphire Discord server! The next-gen object-oriented Discord.js bot framework can be found here.
2.1KMembers
View on DiscordWant results from more Discord servers?
More PostsNested message component collectorsHow should I be handling nested message component collectors?
What the best way to do itHow to get message args ?Like i have command `+mark 123`, how i can get the `123`API Placeholder in RouteI didn't found it in the docs. Is there any way to get a placeholder into a route like in express wiTypeError piace.aliases is not iterableGood afternoon, I mixed such a strange code as best I could. My task was to add a button to the messI'm getting this error when used my new precondtion.my fileAPIInteractionDataResolvedGuildMember does not have idWhile fetching for member using `interaction.options.getMember('member')` it gives two types - `Guil