Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/grammy/mod.ts>enhanceStorage

The Telegram Bot Framework.
Very Popular
Go to Latest
function enhanceStorage
import { enhanceStorage } from "https://deno.land/x/grammy@v1.15.3/mod.ts";

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:

const storage = ... // define your storage adapter
const enhanced = enhanceStorage({ storage, millisecondsToLive: 500 })
bot.use(session({ storage: enhanced }))

Parameters

Session enhancing options

Returns

The enhanced storage adapter