Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
telegraf-ignore-old-messages
Advanced tools
Ignores old messages in Telegram chats.
Why? POV:
Your bot was off for an hour • Each of 1000 users sent 2 messages in that time • Bot wakes up and gets all the updates • Tries to reply to 2000 messages simultaneously • most probably crashes the server
First, run npm i telegraf-ignore-old-messages
. Then, in your Telegraf app:
const { Telegraf } = require('telegraf')
const ignoreOldMessages = require('telegraf-ignore-old-messages')
const bot = new Telegraf(process.env.BOT_TOKEN)
const skipAfter = 5
// the message skipping interval in minutes. Defaults to 1.
bot.use(
ignoreOldMessages(skipAfter)
)
// ...
bot.launch()
ignoreOldMessages should be connected first, before all the other message-related middlewares
npm link
npm link telegraf-ignore-old-messages
. Instead of the default one from npm, Node.js will now use your clone of the middleware!FAQs
The crash-preventing middleware for Telegram bots
The npm package telegraf-ignore-old-messages receives a total of 0 weekly downloads. As such, telegraf-ignore-old-messages popularity was classified as not popular.
We found that telegraf-ignore-old-messages 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.