Skip to content

Accrypt/Appbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Appbot

Settings.json

{
	"auth": {
		"username": "your_bot_username",
		"oauth": "your_bot_oauth_key",
		"clientid": "your_client_id"
	},
	"connect": {
		"channel": "your_stream_channel"
	}
}

Username - The username of the bot in the chat (e.g. Appbot)
OAuth - This is essentially your password (Get that here)
Client ID - This is required to connect to the twitch api, make a client id here
Channel - This is the default channel the application will connect to, just enter your twitch name in lower case

Making a plugin

To create your first plugin for Appbot you need to include the compiled Appbot jar as a dependency to your project. This is different depending on your IDE so check how to do that.

In your main class you want to impliment AppbotPlugin Make sure this imports, it should require you add 2 methods: onLoad() and onUnload()

In the onLoad() method you can add your events and commands:

To add a command, include this in the onload method

public void onLoad() {
	getCommandManager().registerCommand(this, "your_command_name", new MyCommand());
}

Then, in your MyCommand class impliment CommandHandler

public class MyCommand inpliments CommandHandler {

	public void onCommand(Channel channel, User user, String command, String[] args) {
		channel.send("Hello " + user.getName())
	}

}

Compile this and drop the jar into the plugins folder of the application, restart and then when you type your_command_name, it will return "Hello [name]"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages