securejoinbot
securejoinbot copied to clipboard
Secure Generation of Invite links for Private Telegram groups
Secure Generation of Invite links for Private Telegram groups
Do you own a private group but don't want to have a single public link which can be easily circulated and be misused? Here's your solution. Using this bot you can generate limited user, limited time links for users to join your private group while maintaining security.
How to create your own bot using this repository:
- Clone or Fork this repository.
- Create a heroku app and connect to your forked repository. (Alternatively you can also host it on your VPS or Raspberry Pi)
- Create a redis database in redislabs.com or use Redis addon on heroku.
- Rename the sample.env file to .env and fill in all the required details.
- Create a bot in @Botfather and get the BOT_TOKEN and paste it in .env
- Customize the bot messages in strings.py according to your wish.
- Start the bot.
OR just click on the "Deploy to Heroku" button above.
Features:
- Admins can generate limited expiry links via inline mode using
@\<yourbotname\> link. Supports if admin approval is required for users to join the group using the link. (To turn this on, setADMIN_APPROVALto True) - Users can generate links using
/linkcommand, that expires in specified number of days/hours/seconds and is only valid for a single user (customizable to allow more users per link, check sample.env).https://t.me/<yourbotname>?start=linkwill take the user to the bot and automatically generate a link without having to send/link. - Admins can view the logs in their log channels (
NOTIF_CHANNEL_IDneeds to be specified in .env) where the bot should added as an admin. - Admins can reset the limit to generate more invite links in the bot PM using
/resetlimitcommand. - Admins can revoke any link by clicking on "Revoke" button under inline generated links or user generated links in the log channel. (
/revokecommand still work as a reply to any invite link generated by the bot) - Admins can view stats related to how many users have started the bot and generated invite links using
/statscommand.