Here ya go:
https://gist.github.com/szoenikbx/91b324ff3a4c8f4a0f8ff01f62c11494
The errors I receive on the consule are regarding the join part itself:
Failed to join group https://t.me/XYZ The chat has expired or is not valid.
Attempting to join group with invite code: XYZ
Rate limited. Waiting for 285 seconds.
I've received 5 of these errors before I got "Rate limited" timeout. All invite links are 100% valid, I've manually checked them. They don't have any captchas or anything either.
XYZ is of course a dumbie invite code - I used real invites for running the script.
The situation is this:
First 8 groups. 3 groups I'm a member of, next 5 groups I'm not a member of. So the console should return status "Already a member of XYZ1, XYZ2 etc" and keep joining until a total of 5 groups (at a time) is joined. Earlier it was spitting out some Syntax Errors, GPT fixed those, but it cannot fix the issue that the bot is not doing the thing it was created for which is joining group.