Registry / database / botkit-storage-redis

botkit-storage-redis

JSON →
library1.1.0jsnpmunverified

A Redis storage driver for Botkit, version 1.1.0, last updated in 2017. It provides a simple key-value store using Redis as the backend, supporting automatic key namespacing and custom storage methods. It is designed specifically for Botkit's storage API and uses the node-redis library. No updates or maintenance since 2017, making it effectively abandoned. Alternatives include using Botkit's built-in storage or other community-maintained drivers.

npm install botkit-storage-redis
INSTALL
IMPORT
SIG · BOTKIT-STORAGE-RED
B
botkit-storage-redis
databasejavascriptv1.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import storage from 'botkit-storage-redis'
const storage = require('botkit-storage-redis')
The package exports a function directly; requires calling with config to get storage instance.
storage (CommonJS)
const storage = require('botkit-storage-redis')
const storage = require('botkit-storage-redis').default
The package is CommonJS; no default export in CJS.
storage (ESM)
import storage from 'botkit-storage-redis'
import { storage } from 'botkit-storage-redis'
Using named import will fail because the package exports a function as default.

Shows how to import, configure with Redis host/port/namespace, and use Botkit storage.

import Botkit from 'botkit'; import storage from 'botkit-storage-redis'; const redisStorage = storage({ host: process.env.REDIS_HOST ?? 'localhost', port: process.env.REDIS_PORT ? parseInt(process.env.REDIS_PORT) : 6379, namespace: 'myapp:store' }); const controller = Botkit.slackbot({ storage: redisStorage }); controller.storage.teams.save({id: 'team1', name: 'Engineering'}) .then(() => console.log('Saved')) .catch(err => console.error(err));
Debug
Known issues
deprecatedThe package is unmaintained since 2017 and may not work with newer versions of Botkit or Redis.
fix
Consider migrating to Botkit's built-in storage or a maintained alternative.
affects: >=1.1.0
gotchaRequires calling the default export as a function to get the storage object, not just importing it.
fix
Use const storage = require('botkit-storage-redis')(config);
affects: >=1.0.0
gotchaNamespace defaults to 'botkit:store' which may cause key collisions if multiple instances share a Redis DB.
fix
Always provide a unique namespace in config.
affects: >=1.0.0
gotchaAll stored objects must have an 'id' property, otherwise retrieval will fail.
fix
Ensure every object saved has an 'id' field.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: storage is not a function
Missing function call on imported storage module.
fix
Use const storage = require('botkit-storage-redis')(config);
Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED
Redis server not running or connection misconfigured.
fix
Start Redis server or check host/port in config.
TypeError: Cannot read property 'save' of undefined
Storage not properly passed to Botkit controller.
fix
Ensure storage initialized and passed as `storage` in Botkit options.
Upgrade
Version history
1.1.0latest on npm
Audit
Dependencies
redisoptionalPeer dependency for Redis client functionality
Agent activity
12 hits · last 30 days
node
10
OpenAI (training)
1
Resources
botkit-storage-redis — npm install botkit-storage-redis · libregistry