# grammyuser

> User management database middleware plugin for grammY!

Latest version **0.1.1** (published 2023-08-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install grammyuser
pnpm add grammyuser
yarn add grammyuser
bun add grammyuser
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2023-08-25 |
| First published | 2023-08-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Zubin |
| Maintainers | losparviero |
| Keywords | grammy, grammyjs, grammy-plugin, middleware, telegram, telegram-bot |

## Links

- npm: https://www.npmjs.com/package/grammyuser
- Repository: https://github.com/losparviero/grammYUser
- Homepage: https://github.com/losparviero/grammYUser#readme
- Issues: https://github.com/losparviero/grammYUser/issues
- npm.io page: https://npm.io/package/grammyuser

## Dependencies (3)

- [input](https://npm.io/package/input.md) ^1.0.1
- [dotenv](https://npm.io/package/dotenv.md) ^16.3.1
- [mysql2](https://npm.io/package/mysql2.md) ^3.6.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2023-08-25
- 0.1.0 — 2023-08-25

## README

# grammYUser

User management database middleware plugin for [grammY](https://github.com/grammyjs/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.
```node
npm i mysql2
```
In working directory of your bot project.

2. Copy the plugin code from ```user.js``` and paste it in your Telegram bot code.

3. Run ```npm start``` to create or initiliaze the databalse.


### License

MIT ©️ Zubin

---
_Source: https://npm.io/package/grammyuser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
