🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@grammyjs/storage-redis

Package Overview
Dependencies
Maintainers
0
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@grammyjs/storage-redis

Redis storage for grammy library.

latest
Source
npmnpm
Version
2.5.1
Version published
Maintainers
0
Created
Source

Redis storage adapter for grammY

Storage adapter that can be used to store your session data in Redis when using sessions.

Installation

Node

npm install @grammyjs/storage-redis ioredis --save
npm install @types/ioredis -D
import { RedisAdapter } from "@grammyjs/storage-redis";
import IORedis from "ioredis";

Deno

import { RedisAdapter } from "https://deno.land/x/grammy_storages/redis/src/mod.ts";
import { connect } from "https://deno.land/x/redis@v0.32.1/mod.ts";

Usage

You can check examples folder

Vendor Examples

Vercel KV (Upstash)

import { kv as instance } from "@vercel/kv";
import { RedisAdapter } from "@grammyjs/storage-redis";

instance.opts.automaticDeserialization = false;

const storage = new RedisAdapter({instance});

bot.use(session({storage}));

FAQs

Package last updated on 27 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts