Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

creaffy/TellonymController

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tellonym API Account Controller

Example code:

import { AnswerCollector } from "../src/answerCollector.js";
import { Client } from "../src/client.js";

const client = new Client("account token here");
const target = await client.getUserByName("example123").then((user) => user.id);
const collector = new AnswerCollector(client, target, {
  interval: 15000,
  limit: 5,
  idleTimeout: 120000,
});

collector.collect();

collector.on("collected", (answer) => {
  if (answer.answer === "hi") {
    collector.destroy();
  }
});

collector.on("ended", (reason) => {
  console.log(`Collector ended" ${reason}`);
});

List of collector options (all are optional):

timeout

Info: For how long the collector should collect (in millieseconds)
End Reason: "timeout"

idleTimeout

Info: After what about of time without collecting anything the collector should end (in millieseconds)
End Reason: "idle"

limit

Info: After how many messages the collector should end
End Reason: "limit"

interval

Info: Every how many millieseconds tells/answers should be fetched (defaults to 10000ms)


List of account settings:

aboutMe

Type: String

snapchat

Type: String

instagram

Type: String

twitter

Type: String

displayName

Type: String

gender

Type: String (only accepts male, female, diverse)

isTellsOnlyFromRegistered

Type: Boolean

safetyLevelSpam

Type: Number

safetyLevelSexHarass

Type: Number

safetyLevelInsult

Type: Number

email

Type: String

hasAllowedEmails

Type: Boolean

hasAllowedSearchByPhone

Type: Boolean

hasAllowedSearchByLocation

Type: Boolean

hasAllowedShowActivity

Type: Boolean

About

Wrapper around the Tellonym API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published