Skip to content
This repository has been archived by the owner on Jun 4, 2023. It is now read-only.
/ TwitchChat Public archive

A simple IRC client for Twitch

License

Notifications You must be signed in to change notification settings

LukWebsForge/TwitchChat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TwitchChat

A simple IRC client for Twitch

⚠️ This project hasn't been updated for six or more years. Maybe it does still work, but I can't guarantee anything.

Getting Started

Download

I recommend you to use a Maven project for your application. You can access this library via JitPack.

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>com.github.LukWebsForge</groupId>
        <artifactId>TwitchChat</artifactId>
        <version>1.0.0</version>
    </dependency>
</dependencies>

Usage

  1. Create an instance of the TwitchChat using TwitchChat#build(String username, String oauth)
  2. Register your event listeners using EventManager#register(Listener listener)
  3. Connect the instance to the Twitch IRC using TwitchChat#connect()
  4. Join channels using TwitchChat#getChannel(String channel)

Example

TwitchChat chat = TwitchChat.build("twitchusername", "oauth:123456789abcdefghijklmn");
// You can get an oauth key at https://twitchapps.com/tmi/
chat.getEventManager().register(new Listener() {
    @Handler
    public void onJoin(UserJoinChannelEvent ev) {
        System.out.println(ev.getUser().getName() + " joined channel " + ev.getChannel().getName());
    }
});
chat.connect();
TwitchChannel channel = chat.getChannel("twitchchannel");
channel.sendMessage("Hello I'am here!");
Thread.sleep(Integer.MAX_VALUE);

Contribution

If you want to contribute you can find helpful information at Twitch's developer documentation.

Your ideas and bugs are welcome.