JSPM

grammyuser

0.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q27136F
  • License MIT

User management database middleware plugin for grammY!

Package Exports

  • grammyuser
  • grammyuser/user.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (grammyuser) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

grammYUser

User management database middleware plugin for grammY framework!

Features

Middleware for grammY which lets you implement management of users using a database.

Supports a global blacklist feature through column 'isBlacklisted' (0 or 1) in the database.

Supports 'lastSeen' feature for users interacting with bots, along with a 'firstSeen' column storing dates pertaining to the first time a user messaged the bot to the last or recent time.

Stores user records such as Telegram user ID, username, firstName and lastName for user management.

Usage

  1. grammYUser depends on the mysql2 package.
npm i mysql2

In working directory of your bot project.

  1. Copy the plugin code from user.js and paste it in your Telegram bot code.

  2. Run npm start to create or initiliaze the databalse.

License

MIT ©️ Zubin