A SimpleBot plugin that allows to subscribe to Telegram channels from Delta Chat.
For bridging groups use: https://github.com/simplebot-org/simplebot_tggroups
To install run:
pip install simplebot-tgchan
See https://github.com/simplebot-org/simplebot to know how to configure the bot with an e-mail account.
Before you start using the bot, you need to get your own API ID and hash, go to https://my.telegram.org/ and get them then configure the bot:
simplebot -a [email protected] db -s simplebot_tgchan/api_id "12345" simplebot -a [email protected] db -s simplebot_tgchan/api_hash "0123456789abcdef"
Then you must provide a phone number for the bot to use, to start session in Telegram:
simplebot -a [email protected] login
After entering the verification code you received in Telegram or via SMS, start the bot:
simplebot -a [email protected] serve
Then you can start subscribing to Telegram channels adding the bot to Delta Chat groups and using
/sub
command.
You can tweak the interval (in seconds) the bot checks Telegram channels for new messages:
simplebot -a [email protected] db -s simplebot_tgchan/delay 300
By default the bot checks Telegram for new messages every 5 minutes.
You can tweak the maximum size (in bytes) of attachments the bot will download:
simplebot -a [email protected] db -s simplebot_tgchan/max_size 5242880
By default the bot will download attachments of up to 5MB.
You can restrict the usage of /sub
and /unsub
commands to bot administrators only:
simplebot -a [email protected] db -s simplebot_tgchan/allow_subscriptions 0
By default the bot will allow any user to subscribe to Telegram channels.
To add your address as the bot administrator:
simplebot -a [email protected] admin -a [email protected]