✅ | |
✅ | |
✅ | Can send a circle to channels, at a given time |
This bot avoid of some annoying limitations because it uses the Local Bot API Server
although this bot is long polling, kill feature here is the size of files we can work with.
Important
git clone https://github.com/Wl0cKk/circle_tg.git
cd circle_tg
Then create or rename config_example.json to config.json
touch config.json
or mv config_example.json config.json
Open it in any editor and replace TOKEN with obtained token from @BotFather
Important
Get API_ID and API_HASH here - https://core.telegram.org/api/obtaining_api_id
Tip
- In Dockerfile.bot you can specify arguments separated by commas
CMD ["ruby", "--mjit", "./bot", "--server=http://telegram-bot-api:8081", "--keep_files", "--silent"]
Have you already installed docker and docker-compose?
Create or rename .env_example to .env
touch .env
or mv .env_example .env
You are free to change the folder name, but do the same in docker-compose.yml.:
mkdir videos
docker-compose up --build
Installing telegram-bot-api takes a while.
-
ruby -v bundle -v
install all dependencies and follow the installation proccess
telegram-bot-api --api-id=API_ID --api-hash=API_HASH --local
bundle install
ruby --mjit bot
Specify the arguments if you wish
You can start bot using 3 arguments: --keep_files, --verbose, --silent.
- --keep_files — all files including submitted and edited files will not be deleted
- --verbose — Log output from FFMPEG will not be muted
- --silent — Everything will be muted, including logo output and telegram bot logs
Warning
You can't run --verbose and --silent at the same time
Note
- By sending caption along with the video, the bot will not send the video personally, but to the channels specified in config.json
- Don't forget to add channel ID to config.json
- Make the bot an administrator
- '.' — Just a dot, will immediately send circle to channels.
- 'at 2024/11/8 23:05:09' - specifies a timestamp for an action,
YYYY/MM/DD HH:MM:SS
.
Tip
Trailing zero is not important: at 2024/11/08 23:05:09
or at 2024/11/08 23:5:9
This syntax is summarized with the current time. Given the current time is 2024/11/03 14:25:
- 'at 5d 23:05:09' — Scheduled for 2024/11/08 23:05:09.
- 'at 5d 10h25m55s' — Scheduled for 2024/11/09 00:50:55.
- 'in 10d5h' — Will happen in 10 days and 5 hours.