PostgreSQL session middleware for Telegraf
User session stored in PostgreSQL for the framework Telegraf.
Installation
$ npm install telegraf-session-postgresql
Setup
you should create a table named sessions in your database.
CREATE TABLE telegraf_session(id varchar, session varchar);
Example
const Telegraf = PostgreSQLSession = bot = processenvBOT_TOKEN const session = user: 'postgres' host: 'localhost' database: 'name' password: '1234' port: 5432 bot bot bot
API
The database connection configuration is described in The PostgreSQL API -- PostgreSQL.
Contacts
my telegram: @JSusDev, channel https://t.me/Jsusdevs
if you have any questions and suggestions please email me in telegram if you find bugs I will be very grateful if you also let me know