Giter Club home page Giter Club logo

tg-todoer-bot's Introduction

Telegram Todoer Bot

A telegram bot for keeping track of your daily tasks with a RPG-style twist.

Open Source Love svg1 GPLv3 license

  • This bot is still in early development and needs a lot of work. Any and all suggestions are appreciated.
➤ KANG AT YOUR OWN RISK: Your Telegram account may get banned in case of API abuse.
➤ I AM NOT RESPONSIBLE IF YOUR ACCOUNT GETS BANNED.
➤ I AM NOT RESPONSIBLE FOR ANY IMPROPER USE OF THIS BOT.

GAME MECHANICS

  • User adds a task by simply sending a text message to the bot (the text is the task itself), this makes them part of the game and they get 100% HP along with 0 Coins and 0 Mana.

  • Various task-actions have varied effects on the Player's HP and Coins:

    • Completing a task (Done) will increase the Player's Coins by a random value between 1-5
    • Not completing a task (Missed) will decrease the Player's HP by a random value between 10-20
    • Postponed task will decrease the Player's Coins by a random value between 1-3
  • Coins can be used to purchase Mana Potion from the shop. The Mana determines a Player's position in the leaderboard.

  • If a Player's HP reaches 0, the Player's Coins and Mana are reset to 0 and HP is reset to 100%.

  • the /status command can be used to generate a player report with all their relevant information including their rank.

  • Many elements of the bot are inspired by the Japanese anime Mairimashita! Iruma-kun.

Ranking System:

The ranking system works separately from the leaderboard. The rank of the player is also based on their Mana. This system is based on the Gematria system.

RankRequired Mana
Unranked1
Aleph90
Bet178
Gimmel266
Daleth354

Task-Actions:

  • : Marks the task as done.
  • : Marks the task as Missed.
  • 😣: Marks the task as Postponed.

Available Commands:

  • /start: Start the bot.
  • /shop : View the shop.
  • /help: View help message.
  • /list: Lists all the tasks.
  • /leaderboard: Shows the leaderboard.
  • /status: View status

INSTALLATION

Prequisites

Clone the repository

git clone https://github.com/JuvenileLad/telegram-reddit-bot.git && cd telegram-reddit-bot

Install the required python libraries

pip3 install -U -r requirements.txt

Obtain all the required API keys

  1. Telegram
  2. MongoDB

Configuration

copy the contents of config.env_sample to a new file config.env and then edit the following values: (all the values need to be inside double quotes)

  • in SESSION_NAME enter whatever you want as session name in telegram
  • enter telegram API Hash in API_HASH & API ID in API_ID
  • enter telegram bot token in BOT_TOKEN
  • enter the MongoDB URL in DATABASE_URL.

Now run the bot by using the following command: python3 -m todoer

Or you can deploy on Heroku :

Deploy

No need to fill config.env file when deploying on Heroku.

Notes:

Plugins System:

I've tried to add a plugins system in which new plugins can be directly added to todoer/plugins folder, and imported in main.py. Plugins like Item Shop, Pet Shop etc. can be added that way. However, Plugin System requires a lot more testing.

Logging:

There is next to no logging in the app (not even print statements). That is because I've never done logging before since all my programs used to be smaller in scale and print statements got the job done, but since this is a large scale program (with plugins and everything), I plan on implementing proper logging in the app as soon as possible.

Design Pattern:

There is no design pattern and I'd really appreciate any advice regarding that. I understand that the structure of the program is not sustainable but I don't have any idea what to begin with.

tg-todoer-bot's People

Contributors

juvenilelad avatar

Watchers

 avatar

tg-todoer-bot's Issues

Design Pattern

I've tried to add a plugins system in which new plugins can be directly added to todoer/plugins folder, and imported in main.py. Plugins like Item Shop, Pet Shop etc. can be added that way. But despite being better than just having all the modules in one single folder, I am still not satisfied with how the program has been structured.

There is no design pattern and I'd really appreciate any advice regarding that. I understand that the structure of the program is not sustainable but I don't have any idea what to begin with.

Logging

There is next to no logging in the app (not even print statements). That is because I've never done logging before since all my programs used to be for personal use and print statements got the job done, but since this is a public program and at this point the biggest project that I've worked on, I would like to implement a logging system as soon as possible.

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.