Install it with your favorite package manager.
## as usual, with npm
npm i spamprotection
## using yarn?
yarn install spamprotection
Once installed, call the Client
class as needed.
// Adopted from https://github.com/spamwatch/spamwatch-js#basic-usage
const SPB = require("spamprotection");
const lookupApi = new SPB.Client
(async () => {
// Telegram username
const netkaspam = lookupApi.queryUser("Netkas")
console.log(netkaspam)
// Telegram UID
const isThisServiceNotifs = lookupApi.queryUser(777000)
console.log(isThisServiceNotifs)
// Private Telegram ID, copied from the public logs (https://t.me/SpamProtectionLogs/65181)
const someRandomSpammer = lookup.queryUser("TEL-37f7eb286e1702732205949a15c75609625bf5a95655b8023a9d2c8900816eeb-e6f99ecb")
console.log(someRandomSpammer)
})
- Authenication for Operator/Agent/sub-operator API (through
?access_token=<stuff>
parameter) - GitLab CI for tests and prettier