0.1.1 • Published 2 years ago

gets-from-username v0.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Hi! Welcome to Home Page. 👋

Installation

Node.js 16.6.0 or newer is required.

npm install gets-from-username@latest

Simple Instance

// Main
const $ = require('gets-from-username');
$.get_count('thiskyhan').then(console.log); // -> { followers: '44', following: '34', postCount: '0' }
$.get_posts('thiskyhan').then(console.log); // -> [] (this account is private)
$.get_posts('cristiano').then(console.log); // -> [{ ... }, { ... }, ...]
$.get_avatar('thiskyhan').then(console.log); // -> Get the avatar of the username.

// Post Tracker
const Discord = require('discord.js');
const client = new Discord.Client({ intents: Object.values(Discord.Intents.FLAGS).reduce((a, b) => a + b) });
client.login('your_bot_token');

client.on('ready', () => {
  const { Tracker } = require('gets-from-username');
  new Tracker(client, 'thiskyhan');
});

client.on('newPost', username => {
  return console.log(username+' has posted a new post!'); // -> thiskyhan has posted a new post!
});

News

  • You can now get last 12 posts from Username.
  • Tracking posts from username for Discord.js bots.
  • get_avatar function is added. You can now get hd avatar url of the username you specify. (Special thanks to @Nadiga for suggest)

Contact

Discord Badge Discord Badge