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

vk-to-telegram

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vk-to-telegram

Vk to telegram forwarder

  • 0.0.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

vk to telegram forwarder

Powered by Telegraf

What is this?

It is a tool for express who via using VK callback api group forwards posts in channel or chat in Telegram!
Be careful, it doesn't send audio and poll's(maybe fix soon).

Where I can see how it looks?

For example, this code sending posts from Tavern of Heroes | Overwatch to Telegram channel Tavern of Overwatch | News;
from Oleg Livanov - One man army trought Heroku to Telegram channel Oleg Livanov - One man army

Installation

npm install vk-to-telegram@latest --save

Example

const app = require('express')(),
    bodyParser = require('body-parser'),
    vkToTelegram = require('vk-to-telegram'),
    vkToTg = new vkToTelegram({
        botToken: token,
        chatName: chatName,
        ownerId: ownerId,
        vkConfirmation: vkConfirmation,
        vkToken: vkToken
    })
app.use(bodyParser.json()) // Must needed
app.post('/', vkToTg.send) // Now when any content will be posted to this path it's gone to sent to Telegram

app.listen(80,()=>{
  console.log('listening on port 80')
})  

Variables

VariableRequiredDescription
tokenYesBot token from Botfather
chatNameYesTelegram channel or group link, like '@tavernofheroes'
ownerIdYesYour telegram id for sending error if they are. U can get know it from @getidsbot
vkConfirmationYesConfirmation string from ur group callback api server:
vkTokenYesFollow the instructions below:
1. Create Standalone application here: https://vk.com/apps?act=manage
2. Open settings in created application and copy application id
3. Open this link with replace your application id:
https://oauth.vk.com/authorize?client_id=YOUR APPLICATION ID&display=page&redirect_uri=http://vk.com/&scope=offline,video,docs&response_type=token&v=5.73
4. Click allow all that need's and it's all! Your token is in query url, do not copy all link, only token without other params!!!
fromIdOptionalVK group id with '-'in start or nothing, if you don't need check.

Why?

For example, because I had a lot of bot's and when fixing the bug is inconvenient to update the code in all bots.
Also, I have an idea to add discord channel support, but it's just idea. ᕦ( ͡° ͜ʖ ͡°)ᕤ

Keywords

FAQs

Package last updated on 22 Mar 2018

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

  • 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