Telegram-Media-Bot
Telegram Media Bot
A simple Telegram bot that sends a random picture or GIF to a channel.
Written in Crystal using Tourmaline.
Installation
git clone https://gitlab.com/Charibdys/telegram-media-bot.git
cd telegram-media-bot
shards install
shards build --release
Usage
After installing the shards:
- Make a new directory called
res
insidetelegram-media-bot
- Add any pictures, GIFs, or videos with file extensions to the
res
directory. Each file can be at most 50 MB - Rename
config.yaml.copy
toconfig.yaml
- Change
config.yaml
so that it has the correct bot token and channel ID (this should be a negative 13 digit number, i.e.,-100XXXXXXXXXX
) - Run the binary found in
telegram-media-bot/bin/media-bot
The bot sends one file to the channel and quits. You may want to set up a crontab
if you want multiple files uploaded over time.
Development
This program is considered complete. However, it has a few limitations:
- Filenames must include an extension that matches their type (.png, .jpg, .mp4, etc)
- Files must be stored locally
- No job scheduling (for fixed-interval posts, use with
cron
)
Contributing
- Fork it (https://gitlab.com/Charibdys/telegram-media-bot/-/forks/new)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Charybdis - creator and maintainer
Repository
Telegram-Media-Bot
Owner
Statistic
- 0
- 0
- 0
- 0
- 1
- 5 months ago
- April 22, 2023
License
MIT License
Links
Synced at
Sun, 22 Dec 2024 03:15:52 GMT
Languages