iopred / bruxism

A chat bot for YouTube, Discord and IRC.
MIT License
145 stars 19 forks source link

Bruxism

A chat bot for YouTube, Discord and IRC.

GoDoc Go report Build Status

Current plugin support:

Commands are prefixed with @BotName.

eg: @BotName help

Also supports direct invites on Discord and support for announcing streamers going live on YouTube Gaming.

Usage:

Installation:

go get github.com/iopred/bruxism/cmd/bruxism

go install github.com/iopred/bruxism/cmd/bruxism

cd $GOPATH/bin

Setup

You must first generate a YouTube Oauth token in the Google Developer Console.

Go to Credentials and download the JSON config file and save it in $GOPATH/bin as youtubeoauth2config.json

./bruxism -youtubeurl

You will then be given a URL (and copied to clipboard), visit that URL and copy the code, then run:

./bruxism -youtubeauth <AUTH CODE>

Now the bot can be run:

./bruxism -youtubechannelids <youtube channel id1,youtube channel id2>

Important!

The account you choose during the oauth flow is the account that the bot will use to send messages.

If you are trying to test the bot, make sure the account you are sending messages with is different from the bot account.

Bruxism ignores messages from the bot account, so if you are sharing accounts all commands will be ignored.

Run as a Discord bot

./bruxism -discordtoken "Bot <discord bot token>"

It is suggested that you set -discordapplicationclientid if you are running a bot account, this will make inviteplugin function correctly.

It is suggested that you set -discordowneruserid as this prevents anyone from calling playingplugin.

To invite your bot to a server, visit: https://discordapp.com/oauth2/authorize?client_id=<discord client id>&scope=bot

Run as an IRC bot

./bruxism -ircserver <irc server> -ircusername <irc username> -ircchannels <#channel1,#channel2>

Run as a Slack bot

./bruxism -slacktoken <slack token>

It is suggested that you set -slackowneruserid.

Image uploads

Some plugins upload images to imgur (such as chartplugin), it's suggested that you run your bot with -imgurid <imgurid> to enable this.

Arguments:

Special Thanks

Skippy - For DiscordGo and the Music Plugin.