Logging plugin for the grammY framework!
- Log messages received by your bot to console.
- Log message content as well as first name, last name, username and Telegram ID of the sender.
- Supports text and inline messages. In case of media messages, limited to captions.
- For the future, db integrations are possible to implement persistent logs.
Simply copy the plugin code from log.js
and place it in your grammY project.
If you want to try it out first:
- Firstly, clone this repo.
- Then run
npm i
. - Rename .env.example to .env and provide bot token.
- Run the example with node example/echo
To use the example to see out how the plugin works:
node example/echo
A template has been included to get started right away.
To use the template:
node template/template
Modify it as per your needs.
If you'd like to contribute to the project, please read grammY's guide to plugins.
MIT ©️ Zubin