media-bot
Version, currently master branch1 version
- master branchlatestOct 6, 2021
gitlab.com/Charibdys/telegram-media-bot
A simple Telegram bot that sends a picture or GIF to a channel Updates can be found at https://github.com/Charibdys/Telegram-Media-Bot
Installation
# Add this to your shard.yml
dependencies:
media-bot:
gitlab: Charibdys/telegram-media-bot
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
1.1.1- License
- MIT
- Author
- Charybdis
- Target
media-botfrom src/media-bot.cr
Dependencies
Runtime Dependencies
- tourmaline*github: protoncr/tourmaline, branch: master
README
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:
- Add any pictures, GIFs, or videos (MP4's without sound) to the
resdirectory - Rename
config.yaml.copytoconfig.yaml - Change
config.yamlso 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:
- Bot cannot determine if a video (MPEG-4) has sound or not
- If a MP4 with sound is found in the directory, it will be sent as a file
- 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
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Oct 6, 2021
- Crystal
1.1.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
gitlab.com/Charibdys/telegram-media-bot
Metadata
- Created
- Aug 16, 2026
- Updated
- Aug 16, 2026
- Synced
- Aug 16, 2026
- Versions
- 1