grammyuser
v0.1.1
Published
User management database middleware plugin for grammY!
Downloads
17
Maintainers
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
- grammYUser depends on the mysql2 package.
npm i mysql2In working directory of your bot project.
Copy the plugin code from
user.jsand paste it in your Telegram bot code.Run
npm startto create or initiliaze the databalse.
License
MIT ©️ Zubin
