Skip to content

CaffeineProcessorsUnited/telegram-image-bot

Repository files navigation

telegram-image-bot

Installing

Clone/Download this repo

Either download this repository as tarball/zip or clone it with git.

Install dependencies

npm install

Create a configuration file

cp config.sample.json config.json

Adjust the configuration inside config.json to match your needs.

Configuration

Telegram

Grab yourself a Telegram Bot Token from @botfather. For further help see Telegram Bot API. If you successfully registered your bot insert the Token into your config.json

Bing

To search for images the bot needs access to Bings Image API. Get yourself a API key at Bing Image Search API and insert it into your config.json

Optional configuration

  • count - Specifies from how many results the bot chooses a random image (default: 1000)
  • market - Choose the market where the results come from (default: en-en)

Bot configuration

In the bot section of the configuration file you may specify if the bot serves nsfw content or not.

Running

Just run

node app.js