RealSpeaker / telegraf-session-local

Telegraf local sessions middleware with multiple supported storage types (Memory/FileSync/FileAsync/...) using lowdb
https://git.io/v7iw9
MIT License
93 stars 10 forks source link

Error with Session version 1.0.3 with telegraf-js v 3.38 #63

Closed Siedlerchr closed 4 years ago

Siedlerchr commented 4 years ago

I just updated to 1.0.3 because of the Promise fix. However, when I now try to init my LocalSession I am getting an error:

Node: 12.16.3 TS: 3.9.3

import LocalSession from 'telegraf-session-local';
const localSession = new LocalSession({
    database: 'example_db.json',
    property: 'session'
});
Exception has occurred: TypeError
TypeError: telegraf_session_local_1.default is not a constructor
    at Object.<anonymous> (e:\workspace\project\src\telegram\telegram.service.ts:35:22)
    at Module._compile (internal/modules/cjs/loader.js:1133:30)
    at Module._compile (E:\workspace\project\node_modules\ts-node\src\index.ts:858:23)
EdJoPaTo commented 4 years ago

I will check on that.