telegram-imgur-bot

module
v0.0.0-...-8142f9b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2020 License: MIT

README

Telegram Imgur Bot

Build status

A Telegram bot which uploads images sent from you to Imgur and replies with direct links. Useful for sharing images, writing blogs, etc.

Screenshot

Screenshot

Image by Negative Space via Pexels (CC0 license)

Prerequisites

Getting started

$ 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

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) which supports 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
  • Inline keyboard for deleting images from Imgur
  • Generate Markdown and HTML snippets for uploaded images

Credits

License

MIT

Directories

Path Synopsis
bot
db
cmd
bot
web

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL