SimonLeclere / discord-easy-dashboard

💻 Simple module to facilitate the creation of dashboard using discord.js and express
https://www.npmjs.com/package/discord-easy-dashboard
71 stars 11 forks source link

on ready does nothing #24

Closed HeCodes2Much closed 2 years ago

HeCodes2Much commented 2 years ago

this code below seems to do nothing at all for some reason

client.dashboard.on('ready', () => {
    console.log(`Dashboard launched on port ${client.dashboard.config.port} - ${client.dashboard.config.baseUrl}${client.dashboard.config.port === 80 ? '' : ':' + client.dashboard.config.port}`);
});
SimonLeclere commented 2 years ago

Mmh I'll investigate now haha. I'll keep you posted

SimonLeclere commented 2 years ago

Well, it seems that this event was useful for lower versions, when the dashboard wasn't auto-initiated. Now it's useless since the dashboard is started before the eventListener is added. So it will be removed. Instead you can use a try {} catch {} for handling dashboard errors.