Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Resolves Telegram usernames and/or ids to a complete User or/and Chat JSON object(s)
👤 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 PWRTelegram API
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.
$ npm install tg-resolve --save
const tgresolve = require("tg-resolve");
// using the 'bare' function
tgresolve(token, "@kamikazechaser", function(error, result) {
// ... handle error ...
console.log(result.id);
});
// you can create a client (referred to as 'resolver')
// that you can repeatedly use
const resolver = new tgresolver.Tgresolve(token);
// using the 'resolver'
resolver.tgresolve("@kamikazechaser", function(error, result) {
// ... handle error ...
console.log(result.id);
});
Refer to example.js for a more comprehensive guide
Resolve the username
to a Result.
callback(error, result)
Create a client/resolver.
Resolve the username
to a Result, using the client.
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"
}
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.
FAQs
Resolves Telegram usernames and/or ids to a complete User or/and Chat JSON object(s)
We found that tg-resolve 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.