2.0.3 • Published 23 days ago

@twitchapi/chatbot v2.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
23 days ago

TWITCHAPI/CHATBOT


This powerful node module allows you to customize your own Twitch Bot.

FIRST STEPS


First of all you have to create a new Twitch Developer Application. Later you have to generate a user access token with the account you want to make a bot and include the scopes chat:edit and chat:read to be able to read and send messages. You can also include other scopes that are needed to be able to execute some actions like ban users, delete messages, etc...

Then you can build your own TWITCH BOT

EXAMPLE CODE

This is an example about how to build your first bot and make a dice command!
```js
import { ChatBot, Events } from "@twitchapi/chatbot"

const chatbot = new ChatBot({ capabilities: { membership: true, commands: true, tags: true }, clientID: "clientID", channels: ["mychannel"], oauth: "token", nick: "chatbotUsername" }) // You have to include the ChatBot capabilities, is recommended to include both three and the channels the bot will join at the start of the application.

chatbot.on(Events.Ready, () => {
    console.log(`Welcome ${chatbot.user.login} to the ChatBot!`)
})

chatbot.on(Events.PrivMsg, (message) => {
    if(message.content === "!dice"){
        return message.reply(`The dice point to the number ${Math.floor(Math.random() * 6)}`)
    }
})

chatbot.login()
```

You can search for the package's documentation in https://pablornc.github.io/twitchapi/

You are free of making a pull request in the official github repository!

2.0.3

23 days ago

2.0.2

24 days ago

2.0.1

26 days ago

2.0.0

26 days ago

1.4.15

3 months ago

1.4.14

3 months ago

1.4.13

4 months ago

1.4.12

4 months ago

1.4.10

4 months ago

1.4.9

4 months ago

1.4.6

8 months ago

1.4.5

8 months ago

1.4.4

9 months ago

1.4.3

9 months ago

1.4.2

9 months ago

1.4.1

9 months ago

1.4.0

10 months ago

1.4.8

6 months ago

1.4.7

8 months ago

1.2.0

1 year ago

1.2.8

1 year ago

1.2.7

1 year ago

1.3.5

11 months ago

1.2.6

1 year ago

1.3.4

11 months ago

1.2.5

1 year ago

1.3.3

11 months ago

1.2.4

1 year ago

1.3.2

11 months ago

1.2.3

1 year ago

1.3.1

11 months ago

1.2.2

1 year ago

1.3.0

1 year ago

1.2.1

1 year ago

1.2.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago