-
-
Notifications
You must be signed in to change notification settings - Fork 104
Fix member leave event listener not being able to find a thread #740
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
Conversation
|
what is the actual diff? since you renamed, github doesnt show a proper diff... so its hard to review. |
previously it used db to store authors and thread id, which is good we have all the threads in storage, but on jda side it used cache to search for the threads, which is not ideal coz not all threads are always cached, hence the errors. now i use retrieveActiveThreads method to get the threads which is not cache based and then i filter it and close the ones made by leaver. |
Zabuzard
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works, but is there a way to retrieve active threads from a channel? i would prefer an approach like helpForumChannel.retrieveActiveThreads()... to avoid retrieving all and then matching the pattern afterwards.
actually there is a method but it is a get method not a retrieve method https://javadoc.io/doc/net.dv8tion/JDA/latest/net/dv8tion/jda/api/entities/channel/attribute/IThreadContainer.html#getThreadChannels() |
|
Kudos, SonarCloud Quality Gate passed! |
|
Probably via cache again, since it doesnt return a RestAction, ...? |
yea most probably its cache, tho the description doesn't talk about that |








closes #619