bomi
Explore posts from serversSIASapphire - Imagine a framework
•Created by bomi on 5/23/2023 in #sapphire-support
.loadAll() blocks all shards?
Okay, I have finally isolated my problem which I've opened multiple questions about.
The problem is that
(my old bad way of getting all the pieces and reloading them in a loop does the same)
Requirements for reproduction:
- 20+ shards with ~15k guilds (not entirely sure that it's required actually)
- active users using commands
- run the code on all of them
What happens:
1. About half of the shards complete the process within seconds.
2. All clients "freeze" for 10-20 seconds, the shards do not respond to any discord message or interaction. however the event loop does not seem to be blocked because independent functions still run.
3. All shards resume normal operation and the rest of the loadAlls finish.
djs: 14.11.0
node: 16.13.1
sapphire/framework: 4.4.3
42 replies
SIASapphire - Imagine a framework
•Created by bomi on 5/22/2023 in #discordjs-support
broadcastEval blocks all shards
Hello. I have a broadcastEval which calls a function on each shard.
After running on about half of the shards, all shards "freeze" (They don't respond to any interactions or messages).
After about 20-30 seconds, all shards resume normal operation. Then the shards that hadn't completed their function completes it, and the shards respond to all the interactions and messages that they got during the "freeze".
This happened suddenly and to code that has been working well for many months.
It did not happen when I updated, I hadn't updated for a while when it started happening. But I have updated to check if it would help.
Should also be said it doesn't always happen.
I think it does not happen right after shards have been restarted, but it happens say 90% of the time otherwise.
I have not been able to reproduce this on a smaller bot.
djs: 14.11.0
node: 16.13.1
sapphire/framework: 4.4.3
I've tried a lot of different evals and ways to call the function, right now it's:
I hope it's okay that I posted here, you've always been very good at figuring things out!
if it's not ok, please tell me.
4 replies
SIASapphire - Imagine a framework
•Created by bomi on 5/21/2023 in #sapphire-support
Somehow I got in an infinite loop
I have this old code that worked well for a long time, but somehow it now gets stuck in an infinite loop:
In some commands I have a console log such as "find all / Search loaded." Those are printed constantly but the "gotten cmdsrelo on shard"... Is seemingly not printed.
12 replies
SIASapphire - Imagine a framework
•Created by bomi on 2/5/2023 in #sapphire-support
Very intense application command fetching
I'm using the new sapphire, v4.0.1 , with discord js v14.7.1
Suddenly, the the bot does an incredible amount of fetching of application commands, resulting in rate limit.
{"timeToReset":1100,"limit":50,"method":"GET","hash":"Global(GET:/applications/:id/commands)","url":"https://discord.com/api/v10/applications/ID/commands?with_localizations=true","route":"/applications/:id/commands","majorParameter":"global","global":true}
I have no clue why as I do not use any application commands. Neither any clue to what triggers it.
It could be a discord.js problem of course but since I dont have any code at all relating to application commands, I think it's more likely sapphire?59 replies
SIASapphire - Imagine a framework
•Created by bomi on 1/22/2023 in #discordjs-support
Follow announcement channel
How do I follow an announcement channel?
Like
Or is there no way to do this in discord.js so it has the be done some other way?
5 replies
SIASapphire - Imagine a framework
•Created by bomi on 1/12/2023 in #discordjs-support
fetch channel returns undefined
Hello.
I have this code, which worked before I believe:
Now it doesn't work, fetching the channel returns null without any error. {force: true} doesn't help
Seems like discord has made some API changes?
10 replies
SIASapphire - Imagine a framework
•Created by bomi on 12/29/2022 in #discordjs-support
Iterating over all server members OR iterating over people with x role
Hello. Thank you for always being so helpful and taking care of us.
I'm having trouble iterating over but users and boosters. So my first approach was fetching all guild members, and iterating over that and checking if they are boosters, but fetching members times out.
So I tried this simple fetch of all the role members:
This somewhat works, it gets only 4 users though (there is 23 boosters). All of the 4 users it gets are boosters though. Both the console log and the message says 4 members.
20 replies
SIASapphire - Imagine a framework
•Created by bomi on 12/29/2022 in #sapphire-support
Encountered error on event listener CoreMessageParser f
Old working code started getting this error on any message...
20 replies
SIASapphire - Imagine a framework
•Created by bomi on 12/9/2022 in #discordjs-support
Fetch membercount?
This returns undefined most of the time, the rest of the time it gives the membercount, any ideas why? Guessing when it's not loaded in the shard... But then how do I load it?
.approximateMemberCount
is the same.8 replies