easytwitch

1.0.3 • Public • Published

EasyTwitch

A library to use the twitch api more easily among several more options

Install

npm i easytwitch

Usage whit discord.js

const twitch = require("easytwitch")
const Discord = require("discord.js");
const client = new Discord.Client()
const { prefix, token } = require("./config.json")

client.on("ready", () => {
  console.log("Bot on!");
});

client.on("message", async(message) => {
  if(message.author.bot) return;
  if(!message.content.startsWith(prefix)) return;
  const args = message.content.slice(prefix.length).trim().split(/ +/g);
  const command = args.shift().toLowerCase()
  if(command === "followers") {
    let followers = await twitch.followers(args[0]);
    message.channel.send(`The channel ${args[0]} has ${followers} followers!`)
});
client.login(token)

Social media

My webpage ➤ Matylandia
My twitch ➤ Matygodoy_22
My server ➤ Discord
The documentation ➤ EasyTwitch

Package Sidebar

Install

npm i easytwitch

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

3.6 kB

Total Files

4

Last publish

Collaborators

  • matygodoy_22