A twitch chat bot for funzies.
npm install
Local instance
npm run start
Alert Widget
localhost:4000/alert
HackBar Widget
localhost:4000/hack-bar
an easy way to get the OAUTH_TOKEN from a community driven api wrapper
more info on it https://dev.twitch.tv/docs/authentication/#registration
curl -H "Authorization: Bearer <access token>" https://api.twitch.tv/helix/
To get !vox to work install espeak-ng
sudo apt install espeak-ng
!Vox uses node child process spawn to run command
espeak-ng <message>
DEPRECATED say.speak LINUX
To get this working
sudo apt-get install festival festvox-kallpc16k
Source: https://github.com/marak/say.js/
see CONTRIBUTIN.md
- Adds sound mp3 to
assts/sounds
- Add gif animation to
assets/gif
- in
src/overlay/commands.ts
add imports to bots gif and mp3 on a new lines together - Create a new key object on the commands object example
...
import hackerGif from '../../assets/gif/this-is-fine.gif'
import hackerSound from '../../assets/sounds/re-sucks.mp3'
export const commands = {
...
hack: {
gif: hackerGif,
sound: hackerSound,
duration: 3000 // time that gif is displayed in ms
}
}
- Edit
src/bot/commands.ts
orsrc/bot/keywords.ts
thecommands.ts
is for regular !commands keywords are any words in chat that you want the bot to respond to - append the
command
orkeyword
object with a new object like so
export const commands = {
...
hack: {
text: 'bot will type this in chat'
// you can also have an array of strings to randomly choose from
text: ['bot will type this', 'or maybe this']
}
}
or
export const commands = {
...
hack: {
say: 'bot will say this using vox'
}
}
or both is acceptable. The bot will do both.
export const commands = {
...
hack: {
text: 'bot will type this in chat',
say: 'bot will say this using vox'
}
}