Coder Social home page Coder Social logo

botmincock's Introduction

botmincock

telegram bot backend for accounts maintenance, patching the payment gateway, monthly book keeping

docker-compose --env-file dev.env up mongostore

docker-compose --env-file dev.env up botmincock docker-compose --env-file dev.env build

docker exec -it ctn_store /bin/bash -c mongo

dev-btmnck b07m1nc0ck

botmincock's People

Contributors

kneerunjun avatar

Stargazers

 avatar  avatar

Watchers

 avatar Kostas Georgiou avatar

botmincock's Issues

registering a new user account

This helps in registering a new user with botmincock database. A user can self register in the database - incentive to register in the database should be given by the system admin. User issues a command in the group and the bot then can save the details against unique ids.

  • user issues a command in group chat @psa_badmintonbot /registerme [email protected]

  • bot identifies the command

    • command if not identified bot throws error
    • exits the task
    • waits for new command
  • bot validates the email

    • email not valid, bot throws error
    • exits the task
    • waits for new command
  • bot registers the user with unique chat id to the database

    • Error registering the account, bot throws error
    • exits the task
    • waits for a new command
  • bot responds with success

MarkPlayday - daily GM messages parsed to debits onto accounts

This function

  • Eyeball all the err paths, and fix user messages
  • Test when total play days ==0, no one has answered polls, or everyone has opted out of play
  • Test when player hasn't answered polls , or has opted out of play
  • BUG: when player opts to play, the player share has to be recalculated given the changed estimates
  • Player shares, total play days, expenses, recoveries till now shouldnt be the responsibility of MarkPlayday
  • Testing AttendanceBotCmd.Execute( ) for all possible scenarios
  • Enabling user messages for MarkPlayDay
  • biz package needs offloading of the responsibilities
  • Testing AdjustDayDebit
  • Testing AdjustPlayDebitBotCmd.Execute

Cron job for Playday debit adjustment

  • Cron job enabled in from Docker container
  • Shell script as a trigger
  • HTTP endpoint, handler that a trigger can call
  • container entrypoint from entry.sh , entry.sh will enable cron deamon

getting user info - ids

All the commands following /registerme require the user ids to reference the user. We need a command that can help get the user info for the same

/listusers and the bot shall come back with

UserID UserName Elevation

Refactor package design

In what turns out to be a good learning experience - we have encountered a spot where it can be observed that change in the design will greatly clean up the code. But since the packages end having circular references this design activity can lead to a dead end.
Here is some guidance on how to get rid of the circular references yet still keep your package design intact.

run.sh script for containers

while one can directly run containers from the shell and so can systemctl , run.sh is cleaner and less brutal on the containers

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.