Socket
Socket
Sign inDemoInstall

easytwitch

Package Overview
Dependencies
7
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    easytwitch

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


Version published
0
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 17 Mar 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc