Closed DakshNamdev closed 6 months ago
I've also experienced this issue. (@~@ But is error in dashboard.
Code:
const { Client: HostClient } = require('discord-cross-hosting');
const config = require('./Config');
const hostclient = new HostClient({
agent: config.web.agent,
authToken: config.global.authToken,
host: config.hosting.host,
port: config.hosting.port,
});
hostclient
.on('debug', m =>
config.global.logLevel.debug ?
console.debug(m)
: ''
)
.on('ready', async d => {
console.log(`Success! =>${ d.id } `);
});
hostclient
.connect()
.then(async (hc) => {
console.debug(hc)
console.log(`WEB | Delay: ${ await hc.ping() }ms`);
});
const express = require('express');
const app = express();
const port = config.web.port;
app.use('/home', require('./routes/home'));
app.use('/auth', require('./routes/auth'));
app.use('/dashboard', require('./routes/dashboard'));
app
.get('', (req, res) => {
return res.redirect('/home')
})
.get('/', (req, res) => {
return res.redirect('/home')
});
app.listen(port, async () => {
console.log(`http://${ config.web.host }:${ config.web.port }`);
});
Whever i start cluster after bridge starts up, the cluster says it's connected to bridge but then errors up.
I've hopefully sent the required things for you to debug.
Bridge's Output
Cluster's Output
Bridge.js
Cluster.js
in Bot file or src/index.js
Discord.Client's options are set to
and below