1.0.3 • Published 3 years ago

easytwitch v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

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