Not recieving heartbeats, killed after ~50 seconds, zombie connection, do recieve guildCreate event
Hey, I'm having a really annoying issue. I have a ubuntu server on a digitalocean droplet where I try to host a djs 14 bot made with typescript. I have ran a djs 13 bot with javascript on the same server, with no issues. For some reason, when I run it, the bot status changes to "Online" but I never recieve the ready event, nor recieve commands. After about 50 seconds, it's killed (maybe after recieving all ~650 guilds?).
This is the output from
client.on("debug")
:
It takes about 40-50 seconds from the "First heartbeat sent" until "Destroying shard".
Using the raw event I got a lot of my guilds logged, not sure if i recieved every guild.
Node version: 20.3.1
Djs: 14.11.0
Ubuntu 22.10
Please let me know if any more info is needed š10 Replies
ā¢ What's your exact discord.js
npm list discord.js
and node node -v
version?
ā¢ Post the full error stack trace, not just the top part!
ā¢ Show your code!
ā¢ Explain what exactly your issue is.
ā¢ Not a discord.js issue? Check out #useful-servers.As in I recieve a ready event?
Nope
Only intent I add is
GatewayIntentBits.Guilds
Let me try
I can try that in a secForgot to change "debug" to "raw" my b
it's counting guilds rn. at 217
nothing else
It started off really fast and then slowed down, stuck at 219 for about 15 seconds or so
got to 222 then killed
Weird it didn't even send the destroying connection zombie thing this time
I added it again afterwards
trying a different token now
Logged in instantly
Yes, same bot
And it takes only about 3 secs to ready from i enter the command
yup
beofre or after client.login?
[ 'shardDisconnect', 'ready', 'interactionCreate' ]
very lame, just []
hmm
This is all
This is the entirety of the entry point:
Correct. Only those two.
InteractionCreate.ts
Ready.ts
Nope, just importing the listeners and exporting them as an array
ts-node Bot.ts
Yup. Never done that before, do I just run tsc at the top level of the directory?
well my tsConfig is only this so doubt it
okWell. Maybe i just should upgrade the droplet and see if that solves it
probably why the javascript bot works yeah
True, I didn't expect the transpiling to take this much computing. I'll give that a shot and if not i'll just upgrade
Can I transpile the JS to a completely different directory, completely seperate from the typescript?
Transpiled JS ran in just a few seconds and works perfectly, thanks so much for the help!!
Will be compiling all my bots from now on, never realized the performance difference was that different