

catch() in your code, you can use the unhandledRejection event listener on Node's process variable to handle most if not all of them. Click OK > Apply to apply the changes, and exit the window. In the Discord Properties window, open the Compatibility tab, and uncheck the box next to Run this program as an administrator. in the cmd prompt, I get this error ReferenceError: Client is not defined at Object.

Maybe try causing different kinds of errors the error you tested out was an API error, but you could also cause discord.js library errors or even standard JS errors to see what happens.Īs for how you could handle errors that are unhandled by a try/catch or. To do so, follow these simple steps: Locate the Discord icon on your desktop, right-click it and open its Properties. Ive just started working on a discord bot, but whenever I try to start it using node. I don't know which, if any, of those theories is accurate. I'm assuming that either: a) Discord's error event only triggers when an error is caught and not unhandled, or b) Discord API errors don't trigger that event. catch() or try/catch on the error to catch it and do something with the error instead of interrupting or crashing your code execution. Essentially, think of any API Error like the permission error that occurs on a Promise. I suspect that the error handler doesn't pick up unhandled rejections. ? throw new Error("Need Discord.I'm not sure why that line is not called when you get the permission error. > Please use "Project > Module Manager" and "Project > Reinstall Node Modules" to update to Discord.JS v12. > This version of Discord Bot Maker requires Discord.JS v12. What is not working? What is the error that appears? Could you post the full bot log? Also, were you using the beta version of DBM before this? Yes, I used the beta version before,here is the error codeīot has started at Monday, Jul 6, 2020, 11:47:48 AM Could you please provide more information? You do not need to use the new project, I'm just trying to figure out what the problem is. Originally posted by PEPENEK:Hello,it doesn't help me either,I don't want to create a new project because I spent a lot of time on the current one
