We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to limit messages per group rather than each individual? Maybe my setup is wrong?
const { Telegraf, Extra } = require('telegraf'); const rateLimit = require('telegraf-ratelimit') const limitConfig = { window: 30000, limit: 1, onLimitExceeded: (ctx, next) => ctx.reply(messages[Math.floor(Math.random() * messages.length)]), } const bot = new Telegraf(api); bot.use(rateLimit(limitConfig))
The text was updated successfully, but these errors were encountered:
i have the same problem.. it's not working
Sorry, something went wrong.
The documentation says that key defaults to user id. On the simple bot example you can find how to change the key
keyGenerator: function (ctx) { return ctx.chat.id },
No branches or pull requests
Is it possible to limit messages per group rather than each individual? Maybe my setup is wrong?
The text was updated successfully, but these errors were encountered: