Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
node-vk-bot-api-session-redis
Advanced tools
Redis session middleware for node-vk-bot-api.
$ npm i node-vk-bot-api-session-redis -S
Before you must set TOKEN
and GROUP_ID
in process.env
.
$ npm test
const VkBot = require('node-vk-bot-api')
const RedisSession = require('node-vk-bot-api-session-redis')
const bot = new VkBot({
token: process.env.TOKEN,
group_id: process.env.GROUP_ID
})
const session = new RedisSession()
bot.use(session.middleware())
bot.on((ctx) => {
ctx.session.counter = ctx.session.counter || 0
ctx.session.counter++
ctx.reply(`You wrote ${ctx.session.counter} messages.`)
})
bot.startPolling()
host
: Redis host (default: 127.0.0.1
)port
: Redis port (default: 6379
)key
: Context property name (default: session
)getSessionKey
: Getter for session keygetSessionKey(ctx)
const getSessionKey = (ctx) => {
return `${ctx.message.from_id}:${ctx.message.from_id}`
}
MIT.
FAQs
Redis session middleware for node-vk-bot-api
The npm package node-vk-bot-api-session-redis receives a total of 2 weekly downloads. As such, node-vk-bot-api-session-redis popularity was classified as not popular.
We found that node-vk-bot-api-session-redis demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.