import * as mod from "https://dotland.deno.dev/x/grammy@v1.24.1/convenience/session.ts";
Classes
The memory session storage is a built-in storage adapter that saves your
session data in RAM using a regular JavaScript |
Functions
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. | |
| |
Session middleware provides a persistent data storage for your bot. You can
use it to let your bot remember any data you want, for example the messages
it sent or received in the past. This is done by attaching session data to
every chat. The stored data is then provided on the context object under
|
Interfaces
When enhancing a storage adapter, it needs to be able to store additional information. It does this by wrapping the actual data inside an object, and adding more properties to this wrapper. | |
A lazy session flavor is a context flavor that holds a promise of some
session data under | |
Options for enhanced sessions | |
A mapping from version numbers to session migration functions. Each entry in this object has a version number as a key, and a function as a value. | |
A session flavor is a context flavor that holds session data under
| |
Options for session middleware. | |
A storage adapter is an abstraction that provides read, write, and delete access to a storage solution of any kind. Storage adapters are used to keep session middleware independent of your database provider, and they allow you to pass your own storage solution. |
Type Aliases
Options for session middleware if multi sessions are used. Specify |