Coder Social home page Coder Social logo

tg-secret-santa-bot's Introduction

Secret Santa Telegram bot ๐Ÿคซ๐ŸŽ…๐Ÿผ

Extremely simple and straightforward Telegram bot to organize a Secret Santa in a Telegram group chat.

I was pretty shocked to discover there's not a single basic implementation of a Secret Santa bot on Telegram, so I've decided to spend a couple of hours on this small bot. I've tried to keep it as simple and gimmick-free as possible. The idea is simple: add the bot to a group chat, ask the members to join in, and start the Secret Santas draw once the gang's all in. Easy as that.

Running an instance of the bot

The is no installation setup/packaging, it's just a Python script you run as you prefer. I'm personally running it using supervisor in a virtualenv

  1. rename config.example.toml to config.toml
  2. open config.toml and set your bot's [telegram].token
  3. install the requirements via pip install -r requirements.txt
  4. run the bot with python main.py

The bot

I have an instance running at @secretsantamatcherbot

The old Pyrogram implementation

The bot has been rewritten from scratch: the old implementation based on Pyrogram had some drawbacks caused by me not wanting to write a data storage. The sourcecode of the old bot can be found here

Credits

Such a tool was actually suggested by a friend of mine, who was wondering whether there was a way to organize a Secret Santa draw without having all your friends to gather at the same place - which, for various reasons, might not be possible.

If you have a Telegram chat with your friends already set up, a Telegram bot is a pretty handy solution to solve the problem.

After posting the first version on Reddit, a guy pointed out how the bot would work way better by using inline keyboards and asking users to join explicitely. It took me two years to find the time to rewrite it, but here we are! Just in time for Christmas

tg-secret-santa-bot's People

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.