15 Replies
d.js toolkit
d.js toolkit3mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - 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! - Marked as resolved by staff
Lezetho
Lezetho3mo ago
ask topgg
LucasB25
LucasB25OP3mo ago
Why topgg?
Lezetho
Lezetho3mo ago
because it's trying to connect to topgg but gettinga 401
LucasB25
LucasB25OP3mo ago
No kidding, this is a development bot.
Lezetho
Lezetho3mo ago
never mind im sort of blind ignore me
LucasB25
LucasB25OP3mo ago
Ok
LucasB25
LucasB25OP3mo ago
my session this destroy
No description
LucasB25
LucasB25OP3mo ago
LucasB25
LucasB25OP3mo ago
No description
LucasB25
LucasB25OP3mo ago
However, is it a good idea to store the session in a JSON? https://sourceb.in/JobnFOp6TE Here I applied what you told me, so that you like it should work properly? As for shardscount, is there an ideal maximum? Because I did not see in the docs the possibility to put them in auto
.on(WebSocketShardEvents.Resumed, async shardId => {
const sessionInfo = sessionStore[shardId];
if (sessionInfo?.resumeURL && sessionInfo.sessionId) {
sessionStore[shardId] = {
shardId,
shardCount: 1,
sequence: sessionInfo.sequence,
resumeURL: sessionInfo.resumeURL,
sessionId: sessionInfo.sessionId,
};
saveSessions(logger, sessionStore);
} else {
console.warn(`No valid session info for shard ${shardId}, starting a new session.`);
sessionStore[shardId] = {
shardId,
shardCount: 1,
sequence: 0,
resumeURL: 'wss://gateway.discord.gg/?v=10&encoding=json',
sessionId: 'owo',
};
saveSessions(logger, sessionStore);
}
});
.on(WebSocketShardEvents.Resumed, async shardId => {
const sessionInfo = sessionStore[shardId];
if (sessionInfo?.resumeURL && sessionInfo.sessionId) {
sessionStore[shardId] = {
shardId,
shardCount: 1,
sequence: sessionInfo.sequence,
resumeURL: sessionInfo.resumeURL,
sessionId: sessionInfo.sessionId,
};
saveSessions(logger, sessionStore);
} else {
console.warn(`No valid session info for shard ${shardId}, starting a new session.`);
sessionStore[shardId] = {
shardId,
shardCount: 1,
sequence: 0,
resumeURL: 'wss://gateway.discord.gg/?v=10&encoding=json',
sessionId: 'owo',
};
saveSessions(logger, sessionStore);
}
});
What foolishness are you talking about? I removed the else, in order to have only the first condition
LucasB25
LucasB25OP3mo ago
https://sourceb.in/5bbTEZC2DW Here are the changes made based on what you told me
No description
No description
LucasB25
LucasB25OP3mo ago
https://sourceb.in/AR1SbaLXyS like this However, I do not feel that it does not really work because I launched the bot and then stopped for a few seconds while making commands but the bot is not usable
LucasB25
LucasB25OP3mo ago
LucasB25
LucasB25OP3mo ago
ah Yes but a restart is the same as killing a node There is no interruption How do I update without interrupting then? lol the bot Any, when I make changes on the bot, it can be commands, events, new content let me explain Initially the bot is start I import my new files into the bot folder, then run npm run buildwhich will create an update to the /dist After that I run pm2 restart which will restart the bot to use updated files in the ./dist no la I just have ctrl c npm run start There I just did with PM2, it makes well a stop What do you mean? Let’s say that in itself I don’t care, if the commands do not react it is the vocals that matter to me The bot makes music, if it loses the vocal, it’s not good I use lavalink client: lavalink-client Yes I know this is already implemented in their system I send a name, or link, and it sends a request to the lavalink which returns me the sound spotify, deezer etc etc I agree with the sources used so it is not a violation in my case if... look well
Want results from more Discord servers?
Add your server