You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OnGuildLeaveCloseThreadListener warnings on unknown threads #619
Sometimes the OnGuildLeaveCloseThreadListener logs a warning that it can not find certain threads:
How is this possible? Were the threads deleted, by whom? Are they just closed/archived and JDA doesnt find them anymore? Why does this happen so often?
This is not supposed to happen, the reason should be found and then either fixed or this log has to be adjusted to debug level, if this is an expected event.
This issue is stale because it has been open 30 days with no activity. Remove stale label, comment or add the valid label or this will be closed in 5 days.
this issue is still there btw. happens frequently. probably an issue with archived threads that have to be retrieved first and are not in cache anymore or sth
fix is easy just use Guild#retrieveActiveThreads method to retrieve all active threads and then use ThreadChannel#getOwnerId method to get the creator id and match it with the user id from the member remove event.
This wasn't possible before the forums channel update coz back then all threads were created by the bot and we needed a db to store who actually created the thread. But, it is not the case anymore so we can get rid of the db stuff in this command, and iirc the db was created for this specific feature so if it is not being used anywhere else we can get rid of that entire table.
Activity
github-actions commentedon Nov 8, 2022
This issue is stale because it has been open 30 days with no activity. Remove stale label, comment or add the valid label or this will be closed in 5 days.
Zabuzard commentedon Nov 8, 2022
this issue is still there btw. happens frequently. probably an issue with archived threads that have to be retrieved first and are not in cache anymore or sth
Taz03 commentedon Dec 22, 2022
it is happening because rn it uses cache to get the threads
Taz03 commentedon Dec 22, 2022
fix is easy just use Guild#retrieveActiveThreads method to retrieve all active threads and then use ThreadChannel#getOwnerId method to get the creator id and match it with the user id from the member remove event.
This wasn't possible before the forums channel update coz back then all threads were created by the bot and we needed a db to store who actually created the thread. But, it is not the case anymore so we can get rid of the db stuff in this command, and iirc the db was created for this specific feature so if it is not being used anywhere else we can get rid of that entire table.