Cannot catch UnhandledPromiseRejectionWarning in promise
问题 so I'm trying to catch UnhandledPromiseRejectionWarning in my promise, but for some reason it's not working. It ignores my code and just outputs the error to console. Error: UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Forbidden (Cannot send messages to this user) code: e.message.author.openDM().then((message) => { message.sendMessage(`test`); }).catch((error) => { e.message.channel.sendMessage(error + "test"); }); This is a discord bot, using