-
Notifications
You must be signed in to change notification settings - Fork 15
Create Your Bot
Make a Class with the name of your Bot (This Case "CavsBot") and Extend it to TwitchBot.
package tk.cavariux.twitchirctest.Core;
import com.cavariux.twitchirc.Core.TwitchBot;
public class CavsBot extends TwitchBot
{
}
package tk.cavariux.twitchirctest.Core;
import com.cavariux.twitchirc.Core.LightTwitchBot;
public class CavsBot extends LightTwitchBot
{
}
Get an Oauth Key from twitchapps: twitchapps.com/tmi/ your OauthKey may Look like this: "oauth:9kvd020oj3wgcrsyafoaofrt3uv7bi"
Then Make a constructor with your Username and your OauthKey:
public CavsBot ()
{
this.setUsername("YourUsername"); //this.setUsername("CavsBot");
this.setOauth_Key("YourOauthKey"); //this.setOauth_Key("oauth:9kvd020oj3wgcrsyafoaofrt3uv7bi");
}
After August of 2016 you need a ClientID to access the TwitchAPI, this is not a needed step but will remove some features of the plugin making them return errors/null.
To add a clientID please follow this guide
After that just copy and paste the clientID to the constructor
public CavsBot ()
{
this.setUsername("YourUsername"); //this.setUsername("CavsBot");
this.setOauth_Key("YourOauthKey"); //this.setOauth_Key("oauth:9kvd020oj3wgcrsyafoaofrt3uv7bi");
this.setClientID("YourCliendID"); //this.setClientID("axjhfp777tflhy0yjb5sftsil");
}
Then Make a Main Class and create an Object of your Bot
package tk.cavariux.twitchirctest.Core;
public class Main {
public static void main(String[] args) {
CavsBot bot = new CavsBot();
}
}
I changed the imports from 'tk.cavariux' to 'com.cavariux' cause I bought the domain
Lib Made by CavariuX. All rights Reserved © 2015 Twitch Interactive, Inc.
- Automatic Messages
- Custom Commands
- Coins System