https://github.com/beta/telegram-imgur-bot
A Telegram bot for uploading images to Imgur.
https://github.com/beta/telegram-imgur-bot
golang heroku imgur imgur-uploader telegram-bot
Last synced: 4 months ago
JSON representation
A Telegram bot for uploading images to Imgur.
- Host: GitHub
- URL: https://github.com/beta/telegram-imgur-bot
- Owner: beta
- License: mit
- Created: 2020-03-24T03:20:19.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-27T08:02:34.000Z (about 6 years ago)
- Last Synced: 2024-06-23T06:05:00.123Z (almost 2 years ago)
- Topics: golang, heroku, imgur, imgur-uploader, telegram-bot
- Language: Go
- Homepage: https://t.me/beta_imgur_bot
- Size: 263 KB
- Stars: 3
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Telegram Imgur Bot
[](https://t.me/beta_imgur_bot) [](https://github.com/beta/telegram-imgur-bot/actions?query=workflow%3AGo)
A Telegram bot which uploads images sent from you to Imgur and replies with direct links. Useful for sharing images, writing blogs, etc.
## Screenshot

Image by Negative Space via Pexels (CC0 license)
## Prerequisites
- Go >= 1.11
- PostgreSQL >= 9.6, with `images` table created (see [bot/db/README.md](bot/db/README.md) for SQL)
- A Telegram bot created from [BotFather](https://t.me/BotFather)
- Imgur API client created following the guide at [apidocs.imgur.com](https://apidocs.imgur.com/)
## Getting started
```bash
$ git clone https://github.com/beta/telegram-imgur-bot.git
$ go get ./...
$ DATABASE_URL="postgres://[USER]:[PASS]@[ADDR]:[PORT]/[DATABASE]" TELEGRAM_BOT_TOKEN=[YOUR_BOT_TOKEN] IMGUR_CLIENT_ID=[YOUR_IMGUR_CLIENT_ID] go run cmd/bot/bot.go
```
## Deploying to Heroku
[](https://heroku.com/deploy)
### Running with free dynos
> Heroku shuts down free dynos after there is no traffic in a period. A web server is added ([cmd/web/web.go](cmd/web/web.go)) which supports [wakemydyno.com](http://wakemydyno.com/). Register your Heroku app there if you want to prevent it from sleeping.
## To-dos
- [ ] ~~Support logging in to Imgur to upload with users' own accounts~~
- [ ] ~~Support specifying which album to upload to~~
- [x] Inline keyboard for deleting images from Imgur
- [ ] Generate Markdown and HTML snippets for uploaded images
## Credits
- [Telebot](https://github.com/tucnak/telebot)
## License
MIT