Links the Discord chat and the Twitch chat together.
Hi I'm ollprogram, the author of this project. Thanks for using it. If you spot any bugs, typos, or awkward wording, don’t hesitate to let me know. I’ll do my best to fix them. English isn’t my first language, so any corrections or suggestions are welcome.
Find information about the licence used for this project here.
Familiarize yourself with the licence before using my project. It gives information about how you can use it.
With this application you will be able to link your Twitch chat with a Discord text channel in your discord server (guild).
Whenever someone sends a message in a specific Discord channel, that same message will automatically be forwarded to a designated Twitch chat, and vice versa.
⚠️ This application is designed to process a high volume of messages. However, due to Twitch’s low request rate limit, latency may occur on channels with significant activity. Therefore, using TwitchDiscordBridge on highly active channels is not recommended.
⚠️ Using TwitchDiscordBridge on channels you do not own or for which you do not have moderator rights is not recommended.
In this project, I'm often referring to a "Bridge". But, what does a "Bridge" represent in this project? A “Bridge” is an object responsible for transferring messages between two destinations : Discord and Twitch, in our case.
You can download the runnable jar file here.
There are some procedures before launching the program.
-
You need a Discord account and a Discord server (guild).
-
Register a new bot on the Discord Developer Portal .
You should also turn it to private mode. -
In the installation section, turn on "guild install"
-
In the OAuth2 section, in the OAuth2 URL Generator select the "bot" scope. The Discord bot will need some permissions on your server. See the permissions needed in the screenshot below:
If you choose to enable additional permissions, be mindful of their implications. For example, granting the bot permission to mention all roles would allow anyone from Twitch to trigger role-wide mentions on Discord.
-
Use the generated URL to add your bot in your discord guild
- Create a new Twitch account for your Twitch bot. It's recommended to make your bot a moderator on the Twitch channel where you stream.
- Create a new twitch application on the twitch developer portal with your bot account
- (optional) Add
http://localhost:3000/tokenas a redirection URL for your application (it will be used by the script to retrieve your token)
Here are the prerequisites for first time launch :
- Your Discord bot token
discord dev portal > bot > copy or reset token and copy. - Your Twitch bot user access token. You have multiple options for getting it :
- You can use the go script available in the releases section.
For this script you will need you twitch application client id
twitch dev > your console > manage app > copy you client id# linux / bash ./retrieve_twitch_token <your twitch app client id>
# windows / powershell ./retrieve_twitch_token.exe <your twitch app client id>
- Or you can use this token generator online (https://twitchtokengenerator.com/) if you trust it, and if it works for you.
- It's also possible to use the Twitch CLI.
- You can use the go script available in the releases section.
For this script you will need you twitch application client id
- A Twitch channel name (The channel where you stream).
- A Discord channel ID. You need to activate first dev mode on Discord
advanced -> developer_mode -> on. Right-click on the channel where you want your bot to listen to it, and copy the ID.
java -jar TwitchDiscordBridge-x.x.x-shaded.jar (cmd, powershell or bash)
Type help in the console.
/codeto get source code information./bridge discord_target <channel_id>change the discord channel target/bridge twitch_target <channel_name>change the twitch channel target/bridge openopen the bridge./bridge closeclose the bridge./bridge infoget information about the bridge.
helpsee all commandsshutdownshutdown the app without exceptions (wait all tasks end).shutdown nowshutdown the app with exceptions.say <your message>send a message on both platforms./codeto get source code information./bridge discord_target <channel_id>change the discord channel target/bridge twitch_target <channel_name>change the twitch channel target/bridge openopen the bridge./bridge closeclose the bridge./bridge infoget information about the bridge.
Contribution guidelines are available here.
You can create an issue to ask us something by following the related template :
- refactor request
- feature request
- question or help
- bug report
