Skip to content

Tag: node.js

Guild.commands is undefined in discord.js v12.5.3

So I’m using discord.js version 12.5.3 to rebuild a music bot I did a while back. I’m trying to use slash commands but when I use guild.commands.set([commands]) it says that guild.commands is undefined. Here’s that part of my code. Answer Guild.commands was only introduced in v13. In v12, th…

Catching an permission error problem discord.js?

I’m having an issue trying to catch an error. The error I’m wanting to catch is a 403 discord Missing Permission error. However instead of catching the error it’s causing my bot to go offline when the error occurs. Here is how I’m trying to catch my error. Help appreciated. Answer Text…

Unhandled Promise Rejection Warning Error

ERROR (node:39756) UnhandledPromiseRejectionWarning: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client at ServerResponse.setHeader (_http_outgoing.js:561:11) at ServerResponse.header (C:UserselegmOneDriveРабочий столanimflexapinode_modulesexpresslibresponse.js:771:10) at Serv…