I have a group in Telegram that is bombarded by spammers/bots. We have Shieldy enabled, which gets rid of most of the spammers within a few seconds, but the notifications that come a few times per day get really annoying. There is no setting in the group setting that is able to prevent it. How can I restrict the group so that only invited people can join the group?
It can't be entirely avoided.
Change the group settings to "Invite link" in Settings > Manage Group. Revoke the permanent link to regenerate it.
That should reduce your visibility to only "Groups nearby" and require the invite link for anyone else. BUT invite links can be easily generated and tested for validity by a spam bot.
Add a bot like Shieldy (https://botostore.com/c/shieldy_bot/) to your group. It will further aid in restricting new members capabilities, especially bot ID's and uses Captcha verification. Bots can kick genuine people though so watch it carefully.