#Typescript bot using 14.11.0 claims unknown interaction, fails to compile with 14.12.1

9 messages · Page 1 of 1 (latest)

stiff dune
#

From a conversation that began here: #djs-help-v14 message
I am contributing to a Discord.js bot written in TypeScript. Previously, this bot used [email protected], until I updated it recently. I was working on simplifying some Embed code when, for some reason, I began to receive a console error any time I used any slash command. The bot fails/refuses to respond to any command, including ones that I am completely certain that I did not modify. I did not modify the command names or parameters of any command. The error I received is attached. My initial guess was that Discord updated its API, and that I needed to update Discord.js. Indeed, running npm outdated indicated that, among other things, discord.js should be updated to 14.12.1. So, I ran npm update --save discord.js. I did not update any packages that did not need to be updated when I did this. When I attempted to reboot the bot using tsc && node dist/bot.js, I received nearly 100 errors from a file named ../node_modules/discord.js/typings/index.d.ts:1175. All of them appear to be various forms of "unexpected / incorrect syntax"; I can provide the errors if necessary. When I git stashed my code to revert to a version that I know works, I continued to receive the errors from discord.js when attempting to compile the typescript.

The recommended advice was to update typescript to ^5.0.0 to accommodate changes made to [email protected], but updating Typescript to latest (5.1.6). Despite updating it (and all other packages) to their latest version, I continue to get errors from the same tile when I attempt to tsc.

I have since downgraded back to 14.11.0, but the error persists even after git stashing the changes I had made, and I am still not sure what the error is. The code that I am running can be found at https://github.com/earthernsence/ADAnswers-Bot/tree/mirai/5.1.

What makes this an unknown interaction?

open crowBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • Not a discord.js issue? Check out #1081585952654360687.
  • Consider reading #how-to-get-help to improve your question!
  • Explain what exactly your issue is.
  • Post the full error stack trace, not just the top part!
  • Show your code!
  • Issue solved? Press the button!
rancid summit
#

Ur typescript version is still at 4.7.4

#

When you ran the command, did you get a red text saying "The application failed to respond" in the discord app?

stiff dune
#

Yes.
(My internet is also spotty; I'm on vacation in a remote area right now.)

hoary nexus
#

You probably only bumped the ts version in your bot‘s project but got an older one installed globally… do npm ls -g and if that shows ts v4.7 then install v5.1.6 globally with -g flag too

stiff dune
#

I decided to balk on upgrading for now, until I can get a more stable (and not throttled) connection to download the rest of the files I may need.
Anyways, could my error be caused by a connection issue?

lilac flower