Skip to content

A powerful library for interacting with the FakeYouAPI easily

License

Notifications You must be signed in to change notification settings

Pnaci/fakeyou.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord NPM GITHUB

fakeyou.js is a powerful Node.js module that allows you to interact with the FakeYouAPI easily.

Features

Examples

Login or use your token

const FakeYou = require('fakeyou.js');
const fy = new FakeYou.Client({
    token: 'anOptionalSecretToken',
    usernameOrEmail: 'anOptionalCoolUsernameOrEmail',
    password: 'anOptionalSuperSecretPassword'
});
await fy.start(); //required

Search models

let models = fy.searchModel('mario');
models.first();

Make TTS Request

await fy.makeTTS('mario', 'A cool text to speech');
//or
let model = fy.searchModel('mario').first();
if(model) {
    await model.request('A cool text to speech');
}

LeaderBoard

let lb = await fy.leaderboard();
lb.getPosition(3, true);

Edit client user

await fy.user.edit({
    description: 'Another **random** user in FakeYou',
    twitter: null,
    github: 'a-cool-username',
    ttsVisibility: false
});

Get all data from an entity

await fy.models.fetch('TM:7wbtjphx8h8v');
//or
await fy.fetchUser('acoolusername');
//or
let result = fy.results.cache.get('TR:tn7gq96wg6httvnq91y4y9fka76nj');
if(result) {
    await result.fetch()
}

Useful links

About

A powerful library for interacting with the FakeYouAPI easily

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%