@grammyjs/ratelimiter
Advanced tools
Comparing version 1.1.4 to 1.1.5
@@ -47,3 +47,3 @@ interface User { | ||
*/ | ||
keyGenerator?: (ctx: C) => void; | ||
keyGenerator?: (ctx: C) => string | undefined; | ||
} | ||
@@ -50,0 +50,0 @@ export declare const defaultOptions: { |
@@ -9,3 +9,3 @@ "use strict"; | ||
storageClient: "MEMORY_STORE", | ||
keyGenerator: (ctx) => ctx.from && ctx.from.id.toString(), | ||
keyGenerator: (ctx) => ctx.from === undefined ? undefined : ctx.from.id.toString(), | ||
}; |
{ | ||
"name": "@grammyjs/ratelimiter", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "This is a plugin for grammY and Telegraf Telegram bot frameworks to rate limit users and deflect heavy spamming in your bots.", | ||
@@ -35,4 +35,4 @@ "scripts": { | ||
"devDependencies": { | ||
"deno2node": "~0.5.0" | ||
"deno2node": "~1.3.0" | ||
} | ||
} |
7389
10
178