Six
Six
DIAdiscord.js - Imagine an app
Created by Six on 9/5/2023 in #djs-questions
UND_ERR_CONNECT_TIMEOUT
I am getting this error, my bot was working fine a week ago when I was working on it.
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^

ConnectTimeoutError: Connect Timeout Error
at onConnectTimeout (/mnt/g/Documents/BDO/Recruitment Bot/node_modules/undici/lib/core/connect.js:182:24)
at /mnt/g/Documents/BDO/Recruitment Bot/node_modules/undici/lib/core/connect.js:129:46
at Immediate._onImmediate (/mnt/g/Documents/BDO/Recruitment Bot/node_modules/undici/lib/core/connect.js:170:9)
at process.processImmediate (node:internal/timers:471:21) {
code: 'UND_ERR_CONNECT_TIMEOUT'
}
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^

ConnectTimeoutError: Connect Timeout Error
at onConnectTimeout (/mnt/g/Documents/BDO/Recruitment Bot/node_modules/undici/lib/core/connect.js:182:24)
at /mnt/g/Documents/BDO/Recruitment Bot/node_modules/undici/lib/core/connect.js:129:46
at Immediate._onImmediate (/mnt/g/Documents/BDO/Recruitment Bot/node_modules/undici/lib/core/connect.js:170:9)
at process.processImmediate (node:internal/timers:471:21) {
code: 'UND_ERR_CONNECT_TIMEOUT'
}
Even when I remove all my code and just run this, I get this error.
const fs = require('node:fs');
const path = require('node:path');
const { Client, Collection, Events, GatewayIntentBits } = require('discord.js');
const { token } = require('./config.json');

const client = new Client({ intents: [GatewayIntentBits.Guilds] });

client.login("mytokenhere");
const fs = require('node:fs');
const path = require('node:path');
const { Client, Collection, Events, GatewayIntentBits } = require('discord.js');
const { token } = require('./config.json');

const client = new Client({ intents: [GatewayIntentBits.Guilds] });

client.login("mytokenhere");
Obviously my token is my actual token (thought the problem had something to do with my dotenv so then tried config file and just putting my token in index.js, nothing fixed it) Also found this github issue which looks like mine, but should've been resloved about a year ago: https://github.com/discordjs/discord.js/issues/8489
4 replies