• Stars
    star
    252
  • Rank 161,312 (Top 4 %)
  • Language Vue
  • License
    GNU General Publi...
  • Created almost 3 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Full featured Twitch chat alternative to fill gaps from the official one.






A custom twitch chat that aims to fill gaps in the official Twitch chat for streamers.
The main goal is to follow your chat as best as possible.

For developpers, Twitchat exposes an API to receive events and control some features remotely.
๐Ÿ“– Read its documentation.


Features

  • Enable an emergency button with custom actions to prevent from follow bots and doxxing
  • Create your own sub/follow/rewards/poll/... alerts and chat commands with the Trigger system that allows to control your OBS sources and filters as well as Spotify or Deezer when an event occurs
  • Control Twitchat and create polls or predictions with your voice
  • Read your messages and alerts out loud thank to the include text-to-speech
  • Pin messages and find them back later
  • Display the first message of users seperatly so you don't forget to greet them
  • Show any message of your chat on your stream with a single click
  • Stream Deckโ„ข plugin
  • Custom spoiler feature so viewers can hide message contents to the streamer
  • Alert command to make Twitchat shake, blink, emit sound and display a message over everything else
  • Edit your stream's info from Twitchat with possibility to create pressets
  • Create a timer or a countdown with a simple command and show it on your stream
  • Control spotify or deezer from chat commands (create your own song request system) and show currently playing track on your stream
  • Make it easier to follow a conversation between users
  • Remember where you stopped reading the chat by clicking any message
  • Track a user to make sure not to miss their messages
  • Create a raffle and pick random winners. An overlay is available to display a wheel that selects a winner.
  • Create a bingo in which users have to find a number or an emoji
  • Ask your viewers for suggestions with a dedicated command
  • See if a user is not following the channel
  • Display received whispers and answer them
  • Filter some messages (bots, commands, self, /me, etc...)
  • Customize messages display (remove badges, show minimalist badges, remove emotes)
  • Customize messages appearance by roles (viewers, mods, vips, subs)
  • Moderate messages (ban, timeout, delete message)
  • Allow/deny messages blocked by automod
  • Display when it's the first message ever of a user on the channel
  • Display mod notifications on chat (ex: "User XXX has been banned by YYY")
  • Display sub/bits/raid/reward/follow notifications
  • Display hype train status
  • Show the last stream info of a raider
  • Integrated activity feed to see subs/cheers/follows/raids/rewards history
  • Create/Delete polls
  • Create/Delete predictions
  • Emote selector
  • BTTV, FFZ and 7TV emotes supported
  • Message autocomplete nickname via "@", emotes via ":", commands via "/" or all via TAB key
  • Allow to search on all messages via command /search
  • Split view in half with chat on left and notifications/activity feed, new viewers, etc.. on the right
  • Filter out only specific commands
  • See live viewers count
  • Keep or remove deleted messages
  • See all your followings that are live to raid them easily
  • Supports boost trains
  • Supports /announce message feature
  • Allow your mods to control your OBS scenes or mute/unmute your mic from chat
  • Expose an API to control some stuff remotely
  • Chat suggestion feature: allow your viewers to give suggestions with a dedicated command and randomly pick one of them
  • Handles "low trust" feature (more info)
  • And many other things....




Project setup

First create a credentials.json file on the root directory and fill in these values :

{
	"server_port": 3018,
	"admin_ids": ["YOUR_TWITCH_USER_ID"],
	"csrf_key": "",

	"twitch_client_id": "",
	"twitch_client_secret": "",
	"twitch_redirect_uri": "http://localhost:8080/oauth",
	"twitch_scopes": [
		"chat:read",
		"chat:edit",
		"channel:read:redemptions",
		"channel:manage:polls",
		"channel:manage:predictions",
		"moderator:manage:announcements",
		"moderator:manage:chat_messages",
		"moderator:manage:chat_settings",
		"channel:moderate",
		"moderation:read",
		"channel:manage:moderators",
		"channel:manage:vips",
		"channel:manage:raids",
		"channel:manage:broadcast",
		"channel:read:hype_train",
		"channel:edit:commercial",
		"channel:read:subscriptions",
		"channel:read:goals",
		"user:read:follows",
		"user:read:blocked_users",
		"user:manage:blocked_users",
		"moderator:manage:banned_users",
		"whispers:read",
		"user:manage:whispers",
		"moderator:manage:automod",
		"moderator:read:chatters",
		"moderator:read:followers",
		"moderator:manage:shield_mode"
	],
	
	"spotify_client_id": "",
	"spotify_client_secret": "",
	"spotify_scopes": "user-read-currently-playing user-modify-playback-state playlist-read-private",
	"spotify_redirect_uri": "http://localhost:8080/spotify/auth"
}

Create a twitch application and fill in the client_id and client_secret values.
Write anything in the csrf_key field, it will be used to secure twitch authentication from CSRF attacks.
Configure the redirect URI of the twitch application with your localhost and/or production URI.
Set it as the redirect_uri value of the credentials.
The redirect uri must end with /oauth, example :

http://localhost:8080/oauth

You can also create a spotify application and fill in the spotify spotify_client_id and spotify_client_secret
By default the server listens on port 3018, you can change it on credentials.json and src_front/utils/Config.ts.




Environment setup

This project has been coded with VSCode with Volar plugin.
It is recommended to install these plugins:
Vue Language Features (Volar): https://marketplace.visualstudio.com/items?itemName=Vue.volar

TypeScript Vue Plugin: https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin

I18n-ally Plugin: https://marketplace.visualstudio.com/items?itemName=lokalise.i18n-ally

For correct typings and better lint performance, it is advised to the enable the Take over mode by disabling the native VSCode's Typescript and Javascript features. Read how to.


Compile project

Install dependencies

npm install

Compiles and hot-reloads for development

npm run dev

Compiles and minifies for production

npm run build

Run server

node server/boostrap.js



Install server

All the following MUST be done on a seperate folder from the GIT project.
Compile the project and push the content of the server folder on your server root.
Next to this file, create a public folder and push the content of your local dist folder inside it.
Also add the credentials.json file at the root of the project.
Create an env.conf file, just write prod inside, and push it at the root of the project.
Install all the production dependencies and run the server.
Here is the expected file structure:
โ”€ root
ย ย โ”œโ”€ node_modules/
ย ย โ”œโ”€ dist/
ย ย โ”œโ”€ controllers/
ย ย โ”œโ”€ utils/
ย ย โ”œโ”€ bootstrap.js
ย ย โ”œโ”€ env.conf
ย ย โ”œโ”€ credentials.json



Localization

App labels can be found under i18n folder.
They are splitted by language then by sections.
Any new file or folder structure can be added to this.
These are all merged into static/labels.json during the build process.
Files can have any name but should have full JSON structure so the plugin i18n-ally can check for label keys on the code. Example:\

โ”€ en\
ย ย โ”œโ”€ global.json\
ย ย โ”œโ”€ subFolder/\
ย ย โ”œโ”€โ”€โ”€ hello.json/\

global.json example:

{
	"global":{
		"hello":"World"
	}
}

hello.json example:

{
	"subFolder":{
		"hello":{
			"lorem":"ipsum dolor sit amet"
		}
	}
}

Will output this JSON file:

{
	"en":{
		"global":{
			"hello":"World"
		},
		"subFolder":{
			"hello":{
				"lorem":"ipsum dolor sit amet"
			}
		}
	}
}


To make localization easier you can start the following PM2 process that will watch for any file change under i18n folder and rebuild the labels.json file.

pm2 start labels-pm2.json

Labels won't automatically be updated on the frontend though (if anyone knows how to make Vite detect that...). To force labels refresh you can use this keyboard shortcut on Twitchat CTRL+Shift+L


Package Stream Deckโ„ข plugin

Run the following command:

npm run streamdeck_package

The compiled plugin will be there streamdeck_plugin/fr.twitchat.streamDeckPlugin.