Giter Site home page Giter Site logo

attestationbot's Introduction

AttestationBot

Overview

This Telegram bot generates a custom confinement form on the fly with the ability to specify the creation time/date.

Getting started

To roll your own bot just follow these steps:

  1. Create your bot in Telegram and get the API token, instructions: Creating a new bot.
  2. Use the \setcommands to create the generate command for your bot.
  3. Send a message to you bot and visit the link https://api.telegram.org/bot**YourBOTToken**/getUpdates in order to retrieve the chat id.
  4. Clone this repository: git clone https://github.com/khllkcm/AttestationBot.git.
  5. Go to the project directory: cd AttestationBot.
  6. Fill out the .env file with your information.
  7. Install the dependencies: npm install.
  8. Make sure to install forever: [sudo] npm install forever -g.
  9. Start the bot: forever src/app.js.

Usage

The main (and only) command is \generate DATE TIME DELAY.

DATE is the date on which you plan to go out, it has to be formatted as DD/MM/YYYY. You can use "today" to use the current date.

TIME is the time on which you plan to go out, it has to be formatted as HH:MM.

DELAY is the number of minutes before TIME that will be inscribed as the form creation time. For example, if you plan on leaving your house at 10:00 and you use a delay of 20, the form will have a creation time of 9:40. This is useful for creating a form on the spot but still, #STAYHOME.

The bot will reply asking you for the reasons you will be going out. Tap to select, tap again to deselect.

The bot will inform you of which reasons are currently selected and once you tap DONE it will generate the form.

Disclaimer

The code for generating the PDF file borrows heavily from the official implementation by the French Interior Ministry in order to ensure complete compliance. It is a pure NodeJS version of the ES6 code they used that has been simplified and refactored.

attestationbot's People

Contributors

dependabot[bot] avatar khllkcm avatar

Watchers

 avatar

Forkers

david-dego

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.