Skip to content

fix: Skip sweeping if the guild is not available #10070

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jan 22, 2024
Merged

fix: Skip sweeping if the guild is not available #10070

merged 8 commits into from
Jan 22, 2024

Conversation

JMTK
Copy link
Contributor

@JMTK JMTK commented Jan 4, 2024

Please describe the changes this PR makes and why it should be merged:
Fixes #10069. It would seem that certain properties do not get set properly if the guild is not available, so when we go to sweep them, the property is undefined (.stickers, .emojis etc). Skipping unavailable guilds on a sweep pass should resolve the issue.

Status and versioning classification:
Patch

@JMTK JMTK requested a review from a team as a code owner January 4, 2024 14:06
Copy link

vercel bot commented Jan 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
discord-js 🔄 Building (Inspect) Visit Preview 💬 Add feedback Jan 22, 2024 1:13pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
discord-js-guide ⬜️ Ignored (Inspect) Visit Preview Jan 22, 2024 1:13pm

@Jiralite Jiralite added this to the discord.js 14.15 milestone Jan 4, 2024
@JMTK
Copy link
Contributor Author

JMTK commented Jan 4, 2024

BTW I was able to test/reproduce this by lowering my sweep interval to 1s, which was too soon before the bot was able to login and I got the same error. Seems fine after

@JMTK JMTK requested a review from Qjuh January 4, 2024 20:39
@almeidx almeidx requested a review from vladfrangu January 18, 2024 21:21
@kodiakhq kodiakhq bot merged commit fed7f34 into discordjs:main Jan 22, 2024
@Jiralite Jiralite changed the title Skip sweeping if the guild is not available fix: Skip sweeping if the guild is not available Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Cannot destructure property 'cache' of 'guild[key]' as it is undefined.
8 participants