That's happening, I even have a lot of group now in telegram that I did not remember I joined.
I don't know how to configure my telegram so people will ask permission first before adding me, I not a heavy user of telegram so I don't explore it a lot.
Even me too, many atimes when i open my telegram i do get many unsolicited telegram group join and wonder if i solicited for them long time ago, but i can clearly see what had happened to me like that of OP.
Invitation without prior notice and done by bots? A BIG NO NO. To avoid those invitations to happen again, do this.
1st : Open your telegram account, go to settings
2nd : Go to Privacy and Security
3rd : Under Privacy, go to Groups then select "My Contacts" as Who can invite you to groups and channels
4th : Don't add any contacts. Just join your desired channel if you wish by getting their TG Profile link then Save.
Those invitations might be a part of bounty campaign or artificial growth of community to attract investors for selfish reasons. Leave those groups and report spam if you wish.
With this simple explanation i was able to get ride off the mess and now believe that unsolicited telegram group add will be a thing of the past. Thanks for your help.