Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

telegraf-broadcast

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

telegraf-broadcast - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

2

package.json
{
"name": "telegraf-broadcast",
"version": "2.2.0",
"version": "2.2.1",
"description": "Library for broadcast message to all users for telegraf.js",

@@ -5,0 +5,0 @@ "author": "Stas Kardash real.peha@gmail.com",

@@ -20,3 +20,2 @@ # Telegraf Broadcast

const bot = new Telegraf(process.env.BOT_TOKEN)
const broadcaster = new Broadcaster(bot)

@@ -27,3 +26,3 @@

bot.start((ctx) => {
broadcaster.broadcast(userIds, 'Hello everyone')
broadcaster.sendMessage(userIds, 'Hello everyone')
})

@@ -30,0 +29,0 @@

@@ -41,2 +41,4 @@ import { Job, EventCallback, CompletedEventCallback, FailedEventCallback, Queue, QueueOptions } from 'bull'

static queueName: string
constructor(bot: Telegraf<any> | Telegram, bullQueueOptions?: QueueOptions)

@@ -65,3 +67,3 @@

public failed(formatJob?: boolean): Job<any> | Promise<FormatterFailedJob<any>>
public failed(formatJob?: boolean): Promise<Job<any>> | Promise<FormatterFailedJob<any>>

@@ -68,0 +70,0 @@ public status(): Promise<BroadcasterStatus>

@@ -17,2 +17,4 @@ const { Telegraf, Telegram } = require('telegraf')

class Broadcaster {
static queueName = 'tg-broadcast'
constructor(bot, bullQueueOptions) {

@@ -24,3 +26,3 @@ const telegramApi = getTelegramApi(bot)

this.queue = new Queue('broadcast', bullQueueOptions)
this.queue = new Queue(Broadcaster.queueName, bullQueueOptions)
this.queue.process((job, done) => {

@@ -27,0 +29,0 @@ const { chatId, fromChatId, messageId, messageText, extra } = job.data

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc