Sign inSign up

evilfreelancer/socket-yrslf

By evilfreelancer

Updated over 6 years ago

Twitch <-> Discord messaging

Image
0

1.8K

evilfreelancer/socket-yrslf repository overview

Twitch <-> Discord messaging

Bot created for crossplatform messaging between Twitch and Discord

Set the parameters

You need change settings inside .env file to what you need. Example of this file (.env.example) you can find in same folder as project.

And if settings is correct you will see messages in chats after server started.

Available environment variables
EnvironmentDefault value
DISCORD_TOKENxxxx
DISCORD_CHANNEL_ID1234
DISCORD_USER_ID123456
DISCORD_HOOK_URLhook_url
TWITCH_USERNAMEMyBot
TWITCH_CHANNEL#mychannel
TWITCH_TOKENoauth:xxxxxxx
How to obtain tokens, IDs, etc
TWITCH_TOKEN

You need generate OAuth token for your Twitch account.

Please create separated twitch account for bot if you do not wanna lose your primary account.

TWITCH_CHANNEL

This is the part of your channel's URL, for example in https://www.twitch.tv/evilfreelancer path evilfreelancer is channel name.

TWITCH_USERNAME

Name of your Bot user, should be the same as you used for authorization on Twitch.

DISCORD_USER_ID

You need login to Discord Developers portal and create new application.

After you done need login the application to your Discord server.

DISCORD_TOKEN

From Bots page of Discord Developers portal you can find the token.

https://discordapp.com/developers/applications/{application_id}/bots

DISCORD_CHANNEL_ID

Then you need enable debug mode of your Discord client, for this go to your "User Settings", then to "Appearance" and on this page in "Advanced" block will be a "Developer Mode", you need switch this to ON.

Then close the settings page and click MRB on any text chat room what you want, then select "Copy ID" from list and ID and `DISCORD_CHANNEL_ID`` will saved to your clipboard.

DISCORD_HOOK_URL

URL of Discord webhook, can be found on Webhooks tab of Discord server settings.

How to use via NPM

npm install
npm run server 

How to use via Docker

docker pull evilfreelancer/socket-yrslf
docker run -e DISCORD_TOKEN=xxxx -e DISCORD_CHANNEL_ID=.... ..cuted.. -d evilfreelancer/socket-yrslf

How to use via Docker Compose

cp docker-compose.yml.dist docker-compose.yml
docker-compose up -d

Get Support!

Tag summary

Content type

Image

Digest

Size

58.9 MB

Last updated

over 6 years ago

docker pull evilfreelancer/socket-yrslf