enhanceStorage
You can use this function to transform an existing storage adapter, and add more features to it. Currently, you can add session migrations and expiry dates.
You can use this function like so:
ts
const storage = ... // define your storage adapter
const enhanced = enhanceStorage({ storage, millisecondsToLive: 500 })
bot.use(session({ storage: enhanced }))
Type Parameters
T
ts
T
Parameters
options
ts
options: MigrationOptions<T>
Session enhancing options
Return Type
ts
StorageAdapter<T>
The enhanced storage adapter