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

tg-resolve

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tg-resolve

Resolves Telegram usernames and/or ids to a complete User or/and Chat JSON object(s)

  • 1.2.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

https://telegram.me/kamikazechaser https://github.com/kamikazechaser/rangi/blob/master/LICENSE.md Gemnasium https://telegram.me/UResolverBot

👤 tg-resolve

A light Node.js Library that resolves Telegram usernames and/or ids to a complete User or/and Chat JSON object(s)

Powered by pwrtelegramapi

Background

The official Telegram API does not allow bots to resolve usernames/ids out of the box. One is forced to create his/her own database so as to resolve usernames. Resolving of usernames is particularly useful in that a bot is able to get a user/chat id of a person or groub it hasn't even seen! Unlike before where a bot is only able to see a person if it has ever recieved his/her message whether in private or in a group.

Useful Scenarios

  • Group administration bots
  • In a bot which has lost its database, but users had previously started the bot
  • General resolving to get user details e.g UResolverBot
  • And much more!

Install

npm i tg-resolve -S

Usage

Refer to example.js for a more comprehensive guide

  • As of v1.2.0, you will need your own bot token!

JSON Object Structure

When resolving for a Group/Channel

{
id: -1001065761006,
title: "End Of The World Party",
username: "EOTWGroup",
type: "supergroup",
when: "2016-10-18 11:22:56"
}

When resolving for a User

{
id: 58258161,
first_name: "John",
username: "john_doe",
type: "private",
last_name: "Doe",
when: "2016-10-18 11:22:56"
}

Issues And Contribution

Fork the repository and submit a pull request for whatever change you want to be added to this project. If you have any questions, just open an issue.

Keywords

FAQs

Package last updated on 29 Oct 2016

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