All Projects → FrozenTear7 → twitch-spambot

FrozenTear7 / twitch-spambot

Licence: MIT license
An automated twitch spam user

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to twitch-spambot

twitch-chat-visualizer
A Node.js Project. Would you like to see your chat stream with a custom design? This is for you!
Stars: ✭ 14 (-48.15%)
Mutual labels:  twitch, tmijs
extensions-rig
A full development environment to build Twitch Extensions. Currently only supports panel extensions but video overlay coming soon.
Stars: ✭ 26 (-3.7%)
Mutual labels:  twitch
twitch-chat-bot
No description or website provided.
Stars: ✭ 63 (+133.33%)
Mutual labels:  twitch
soundboard
forsen soundboard :)
Stars: ✭ 22 (-18.52%)
Mutual labels:  twitch
simple-obs-stt
Speech-to-text and keyboard input captions for OBS.
Stars: ✭ 89 (+229.63%)
Mutual labels:  twitch
NativeTwitch
Native Twitch Player
Stars: ✭ 64 (+137.04%)
Mutual labels:  twitch
createurstech.fr
Première plateforme collaborative et open source qui référence les créateurs de contenus tech francophone.
Stars: ✭ 174 (+544.44%)
Mutual labels:  twitch
laravel-twitch-api
Twitch API for Laravel 5
Stars: ✭ 27 (+0%)
Mutual labels:  twitch
rtmp-social-multicast
Want to stream to Twitch, YouTube, Facebook, and/or Periscope at the same time? That's what this project allows you to do!
Stars: ✭ 42 (+55.56%)
Mutual labels:  twitch
kbot
Twitch chat bot aiming to improve chat experience.
Stars: ✭ 27 (+0%)
Mutual labels:  twitch
TwitchPy
This is a package you can use to connect with the Twitch API, manage a channel, create bots, etc
Stars: ✭ 22 (-18.52%)
Mutual labels:  twitch
Twitch-Farmer
A bot that helps you to get more followers on Twitch
Stars: ✭ 124 (+359.26%)
Mutual labels:  twitch
twitch2dcs
DCS World mod that allows twitch chat to be viewed inside the game
Stars: ✭ 24 (-11.11%)
Mutual labels:  twitch
twurple
Interact with Twitch's API, chat and subscribe to events via PubSub and EventSub.
Stars: ✭ 479 (+1674.07%)
Mutual labels:  twitch
WebNowPlaying-BrowserExtension
The extension to go along with the WebNowPlaying plugin for Rainmeter
Stars: ✭ 76 (+181.48%)
Mutual labels:  twitch
iletaitunefoisundev
La formation dont vous êtes le héros !
Stars: ✭ 204 (+655.56%)
Mutual labels:  twitch
XION-ChaseCam
This is a free-to-use HTML/javascript based overlay for roleplay streamers. Basically it mimics the overlay of the AXON bodycam, but since most folks play in 3rd person, it's a ChaseCam. I've included a logo, and the html file. The html file has the css, html, and javascript all in one file for ease of editing. Goto line 81 of the html file to c…
Stars: ✭ 27 (+0%)
Mutual labels:  twitch
TwitchFollowers
Twitch followers discord bot. (TwitchFarmer)
Stars: ✭ 72 (+166.67%)
Mutual labels:  twitch
pyTwitchAPI
A Python 3.7 implementation of the Twitch API, EventSub and PubSub
Stars: ✭ 132 (+388.89%)
Mutual labels:  twitch
twitch-clip-downloader
[DONE] NodeJS tool to download every clip (and it's metadata) from a Twitch channel
Stars: ✭ 27 (+0%)
Mutual labels:  twitch

twitch-spambot

CI

Coverage - statements Coverage - branches Coverage - functions Coverage - lines

Releases downloads GitHub release (latest SemVer) GitHub Release Date License GitHub open issues GitHub closed issues

An automated twitch spammer

Idea

The idea of this small project is to process the messages from given channel and simply spam whichever phrase is currently the most popular.

We can achieve this by constantly monitoring the chat with IRC from Twitch's Node.js library tmi.js.

We also fetch sub emotes from that channel to reject messages containing them, if we're not subbed.

How to run the program

Node.js is required, the program works under Windows, Ubuntu and macOS, with Node v14, v15 and the new v16 release.

.env file is required to provide data for the api and the config. Create an .env file consiting of values as shown below:

TWITCH_USERNAME=YourUsername
TWITCH_PASSWORD=oauth:YourOAuthCodeGoesHere

CLIENT_ID=YourClientId
CLIENT_SECRET=YourClientSecret
CLIENT_TOKEN=YourClientToken

Twitch password OAuth token (TWITCH_PASSWORD) can be retrieved from here.

Client variables require you to register your own application. After you're done, copy the Client ID given to the application as well as the Client Secret. Then you can retrieve your client token (CLIENT_TOKEN) via Twitch CLI.

Release version

If you're running a release downloaded from the releases page:

yarn --production

yarn start CHANNEL_NAME
# or
yarn start CHANNEL_NAME 3000 30000 5

Master version

Otherwise if you're running the current master build:

yarn

and then:

  • if you want to edit the code and made your own changes, run the TypeScript version
yarn dev CHANNEL_NAME
# or
yarn dev CHANNEL_NAME 3000 30000 5
  • if you want to compile the TypeScript to pure JavaScript
yarn tsc # to make a build directory

yarn start:dev CHANNEL_NAME
# or
yarn start:dev CHANNEL_NAME 3000 30000 5

The program has 4 available arguments:

  • channelName (required) - channel to which we connect to
  • readInterval: default = 5000 ms - the amount of time during which we gather channel messages and try to find the most popular spam
  • sleepInterval: default = 30000 ms - duration of sleep after sending the message to the channel
  • messageScore: default = 5 - score required for the most popular message to be sent (every message read within readInterval can contribute from 0 to 1 to the score and in case messages are the same, 2 will be added instead)
  • mentionResponse: when provided, results in an auto response (response takes randomly from 2 to 4s) to the person who mentioned your nickname in their message

The arguments are passed as:

yarn start CHANNEL_NAME READ_INTERVAL SLEEP_INTERVAL MESSAGE_SCORE MENTION_RESPONSE

If you wish to omit a particular argument (except the channelName), just pass a JavaScript falsy value, or an argument that is not a number, for example:

yarn start CHANNEL_NAME - - 6 -

which will result in running the script with default values for readInterval, sleepInterval and mentionResponse, but will change the default value of messageScore from 5 to 6.

You can also just run:

yarn start CHANNEL_NAME

to run the program with the default arguments. Adjust the arguments to match the desired channel's chat speed and activity.

You can also run multiple instances of the script at once by joining yarn start CHANNEL_NAME commands with & like:

yarn start CHANNEL_NAME & yarn start CHANNEL_NAME2 & yarn start CHANNEL_NAME3

Additional ignored words

You can add additional words to ignore (they will count towards message score, but will not be sent if they end up with the highest score). I found that feature useful since you might want to censor some words yourself.

My example cases were:

  • a streamer got banned, but people could still use his emotes, while they could not be fetched from the api
  • a 3rd party chat app (such as Chatterino for example), allows to easily whisper people without using the @ character before their username, which is hard to filter out - constantly keeping the user list cached would take a lot of resources and requests in bigger chats, so you might want to ignore usernames that are often whispered to avoid unintentional pings

To use this feature edit the json file called ignoredWords.json in the src/utils directory of the project, with structure as shown below:

{
  "ignoredWords": ["forsen1", "forsen2", "forsen3"] // 3 example words to ignore
}

with an array of ignored words of your choice.

Whitelist sub emotes

If you're subscired to a streamer and want to user their emotes with this bot, add their channel ID to whitelistEmotes.json file in the src/utils directory.

Since it would be troublesome for many people to create their own credentials for Twitch API requests you have to add the ID instead of the channel to simplify the process.

At the moment being one example website that allows finding channel IDs by providing usernames can be found here. After getting the channel ID paste it in as:

{
  "channels": ["62300805"] // Example channel ID for NymN's channel
}

Otherwise just leave the channels entry as an empty array.

Known problems

  1. yarn.ps1 cannot be loaded because running scripts is disabled on this system

Error on Windows that doesn't allow the user to install the libraries with yarn:

Open up Windows PowerShell and in the terminal type:

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted

After that, yarn should properly install dependencies.

Contributing

Please review the contributing guidelines. We reserve the right to refuse a Pull Request if it does not meet the requirements.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].