#Channels are becoming de-cached?

34 messages · Page 1 of 1 (latest)

quick raptor
#

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?

https://github.com/requiem-community/serverlistbot/

reef quiver
#

• 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.

quick raptor
#

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,
    ],
thorny spoke
#

That looks… spammy AF

quick raptor
thorny spoke
#

client.rest.on(“rateLimited”, …

#

Listen to it…

quick raptor
#

do you really think that would trigger rate limits?

#

It wasn't before

#

it ran for a solid 3 weeks at one point

thorny spoke
#

I mean you fetch messages and what looks like a lot of other stuff over a loop lmao

quick raptor
#

I don't fetch messages inside the loop, only during the first boot

#
this.resetChannel(this.ship_channel).then((message) => {
                setInterval(async () => {
thorny spoke
#

Is that set internal on 5 seconds?

quick raptor
#

yes

#

it's 5000ms

thorny spoke
#

Id still listen to it

quick raptor
#
{
    "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
    }
}
thorny spoke
#

Only thing I could think of if it doesn’t error but just doesn’t do anything

quick raptor
#

so just listen to that event and log it, see if that's causing it?

thorny spoke
#

Yh

#

If anything

#

I imagine it’ll fire thoguh

quick raptor
#

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

thorny spoke
#

I mean you do set it in an interval lol

quick raptor
#

it's in an interval as it should be refreshing frequently, it's a 40k member server

quick raptor
#

anyone else have any ideas?

signal orbit
#

ur editing the messages every amount of time?

quick raptor