Socket
Book a DemoInstallSign in
Socket

web-standards-ru-calendar-telegram

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web-standards-ru-calendar-telegram

Module for post events from web-standards-ru/calendar

0.0.2
latest
Source
npmnpm
Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

web-standards-ru-calendar-telegram

Telegram bot for web-standards-ru-calendar

Instaling

npm i -S web-standards-ru-calendar-telegram

Usage

const moment = require('moment');

const sendToChannel = require('web-standards-ru-calendar-telegram');

sendToChannel(`name: Яндекс Субботник
date: 10.12.2016
city: Москва
link: https://events.yandex.ru/events/yasubbotnik/10-dec-2016/
`, 'token', 'channel', 'proxy', (event) => {
    //this is a default value when this function is not set
    return `${event.name}\n\n${moment(event.start).utc().format("DD.MM.YYYY")}\n${event.city}\n${event.link}`;
})
    .then((res) => {
        const { status, body } = res;
        //check status == 200
    })
    .catch((err) => {
        console.warn(err);
    });

Tests

For test run

TOKEN='{bot_token}' CHANNEL='@{channel_name}' PROXY='{proxy_url}' npm run test
  • TOKEN - token telegrams bost
  • CHANNEL - channel name, for e.g. @test_channel (telegram bot must be a an administrator)
  • PROXY - proxy url, for e.g. socks://127.0.0.1:9050 for a local tor daemon

Versions

  • 0.0.1

FAQs

Package last updated on 20 Mar 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.