Skip to content

weiran/dead-or-alive-bot

Repository files navigation

dead or alive bot
Dead or Alive Bot

Build Status

A Telegram bot that searches Wikipedia (via WikiData) for people and informs you if they're dead or alive. Inspired by @roguehousewife's inability to remember if any celebrity is dead or alive.

Thanks to @JonShort for the logo and code.

Known as @dead_or_alive_bot on Telegram.

Usage

  • Query via direct message
  • When invited in a group: /alive [query] or /dead [query]

Creating your bot

To run or debug this bot, you'll need to create a bot of your own using telegram's own bot, botfather.

This will provide you with a token which can be used to access the bot.

Running & Debugging

You need to set your bot's token in one of the following ways:

  1. Either add an .env file that sets your Telegram tokens:
BOT_TOKEN_DEV=1234567:AAGdsf08sg9897fsdD89fsD
  1. Or set BOT_TOKEN_DEV as environment variables.

Then run either:

  • npm run debug - debug the bot locally.
  • npm run start - run the bot in production.

note - production requires the BOT_URL env var to be configured

FAQ

I'm receiving 401 responses when debugging!
Sometimes the token provided by the botfather is incorrect, even when first creating the bot.

If you're getting 401 responses, usually this is fixed by trashing the old token and using the fresh one generated.

> note - bot tokens can be managed by running the command `/mybots` within botfather.

By Weiran Zhang
Website | Twitter | GitHub

About

Telegram bot that tells you whether someone is dead or alive.

Resources

License

Stars

Watchers

Forks

Packages

No packages published