I have a project, that scans voice channels - and converts everything into a tidy embed (see image), however after ~12 hours of uptime, it either stops refreshing. or it shows no channels, and the page number becomes NaN of 0, any idea what could be causing this and how to fix it?
#Channels are becoming de-cached?
34 messages · Page 1 of 1 (latest)
• 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.
the main part of the file is
https://github.com/requiem-community/serverlistbot/blob/main/modules/servers.js
this is what happens if the bot is up for a prolonged duration
the embed refreshes every 5 seconds by default, using guild.channels.cache
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildPresences,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildVoiceStates,
],
partials: [
Partials.Channel,
Partials.GuildMember,
Partials.Message,
],
That looks… spammy AF
wdym
do you really think that would trigger rate limits?
It wasn't before
it ran for a solid 3 weeks at one point
I mean you fetch messages and what looks like a lot of other stuff over a loop lmao
I don't fetch messages inside the loop, only during the first boot
this.resetChannel(this.ship_channel).then((message) => {
setInterval(async () => {
Is that set internal on 5 seconds?
Id still listen to it
{
"OWNERS": [
"153102177429094400"
],
"ADMIN_COMMAND_ROLE_NAMES": [
"Moderator",
"Admin"
],
"Flavor": {
"Colors": {
"BLUE": "002be6",
"LIGHT_BLUE": "0098e6",
"GREEN": "00e631",
"ORANGE": "e66700",
"PINK": "e300e6",
"PURPLE": "7700e6",
"RED": "e61000",
"TEAL": "00e69d",
"YELLOW": "e6c400"
},
"SIGNATURE": "Powered by Requiem",
"LOGO": "https://cdn.discordapp.com/avatars/842503111032832090/0b148002e73d45f2c66dfc7df1c228aa.png"
},
"Mentions": {
"WAITING_ROOM": "Alliance Waiting Room",
"SOT_OFFICER": "SoT Officer"
},
"Settings": {
"SPOOF_SHIPS_TO_BE_FULL": false,
"HEARTBEAT_URL": "REDACTED",
"SERVERS_PER_PAGE": 3,
"MS_PER_REFRESH": 5000,
"LOG_CHANNEL": "dev_status_monitoring_test",
"SHIPS_CHANNEL": "active_ships",
"VERBOSE": true
}
}
Only thing I could think of if it doesn’t error but just doesn’t do anything
so just listen to that event and log it, see if that's causing it?
alright I'll leave this open and reduce the refresh time just incase that's it - weird how if it is the case, it ran for a solid 3 weeks and only started getting rate limited now, though
I mean you do set it in an interval lol
yes, but it was fine for 3 weeks is what I'm saying
it's in an interval as it should be refreshing frequently, it's a 40k member server
ur editing the messages every amount of time?
yes, originally 5s now 10s