Skip to content
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

Thread members are not handled correctly #9724

Closed
mq1n opened this issue Jul 18, 2023 · 1 comment
Closed

Thread members are not handled correctly #9724

mq1n opened this issue Jul 18, 2023 · 1 comment

Comments

@mq1n
Copy link

mq1n commented Jul 18, 2023

Which package is this bug report for?

discord.js

Issue description

  1. Create a handle to a thread
  2. Get thread members collection from cache property
  3. Some members does not exist in handled cache collection

Thread from Discord UI;
https://i.imgur.com/QwrratK.png
Members collection result from debugger;
https://i.imgur.com/GGLreNo.png
https://i.imgur.com/oF1TlLf.png
REST result (working well);
https://i.imgur.com/jPOATgZ.png

Code sample

const channel = ...
const thread = await channel.threads.cache.find(x => x.name === `...`);
const members = [...thread.members.cache.values()];

Versions

  • discord.js 14.11.0
  • Node.js 18.12.1

Issue priority

Medium (should be fixed soon)

Which partials do you have configured?

ThreadMember

Which gateway intents are you subscribing to?

GuildMembers

I have tested this issue on a development release

No response

@Qjuh
Copy link
Contributor

Qjuh commented Jul 18, 2023

Like with any member cache you need to fetch the members to have all of them cached. By default only those that interacted with your bot in any way are cached because of the gateway events received containing their data.

@Jiralite Jiralite closed this as not planned Won't fix, can't repro, duplicate, stale Jul 19, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants