Coder Social home page Coder Social logo

birth-tg-bot's Introduction

Telegram bot to remind birthdays

This is a simple telegram bot that send message when is someone birthday.

Requirements

You need to create your own telegram bot [guide here] and know your chat ID [use @userinfobot].

Install

Clone the repo

git clone https://github.com/its-fonsy/birth-tg-bot.git

cd into it and install the requirements

cd birth-tg-bot
pip install -r requirements.txt

create the files to store the token of your bot, the chat_id of your profile and the database with all the birthdays

touch token chat_id bday.dat

fill for each file the required information then start the bot

python3 birth-tg-bot.py

Database

The database has this format

May 5 Henry Cavill
June 1 Tom Holland
June 9 Natalie Portman
August 15 Jennifer Lawrence
September 2 Keanu Reeves

You can use the bday.template file to start adding your birthdays.

Usage

Once the bot is running you can send with telegram this command to the bot:

  • \list to list all the birthday of your database
  • \add to add a birthday to your database
  • \next to see the four next coming birthday
  • \update to sync the list of the database with the list of the bot

BotFather

The message that I use with Botfather to \setcommands

start - the bot say hi
list - list all the birthday of your database
add - add a birthday to your database
next - see the four next coming birthday
update - sync the list of the database with the list of the bot
cancel - cancel the operation when adding a person

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.