<commit_before># Discord-Streambot
A bot for Discord that alerts a channel when Twitch streams go live

Created by [Gyoo](http://twitter.com/GyooRunsStuff)

Join the [Discord server](https://discord.gg/0jXAp5dkKPSyUBFi) to invite Streambot to your server !

# How to use (Commands, process)

`!streambot <command>`
`commands` : List of available commands
`streams` : List of online streams (will send you a PM)
`add <option> <content>` : Add data to the bot (see options below)
`remove <option> <content>` : Remove data from the bot
`list <option>` : List data from the bot
`enable` : Activates bot after configuration
`disable` : Disactivates bot
`invite` : Gives an invite link so people can get the bot on their own server !
`move <channel>` : Moves the bot announces to another channel (Must use the #channel identifier !)

_Options_ :
`game` : Game name based on Twitch's list (must be the exact name to work !)
`channel` : Twitch channel name
`tag` : Word or group of words that must be present in the stream's title
`manager` : Discord user (must use the @ alias when using this option !)

**Recommended process**

*Streambot Server*
`!invite <invite link>` => Bot will join your server. __It will send the "NOW LIVE" announces in the channel from the invite link.__

*Your Server*
`!streambot add channel <Twitch channel>` if you want to add a single channel to Streambot. No link, only channel name (Example : `!streambot add channel gyoo_`)
`!streambot add game <Twitch game>` if you want Streambot to announce every stream with the given game(s). Game name must be the same as on Twitch, copy/pasting is recommended. (Example : `!streambot add game The Legend of Zelda: Twilight Princess`)
`!streambot add tag <Tag>` if you want to filter streams that only contain some tags in the title. (Example : `!streambot add tag speedrun`)
Once configured, `!streambot activate`

If you set both channels, games and tags, then streams will appear if __channel__ is playing __game__ with __tag__ in his title. Keep that in mind when configuring Streambot !

# Development, help

As I run out of free time, I decided to make the bot open source. I hope that people will be able to help me adding more features !

Please check the issues to see both bugs to fix and features to add !

If you have any questions (as the code is mostly not documented, I know it's bad), please hit me on the Streambot Discord server, link is above

## Credentials

To test the bot on your side, you will have to create an XML file with your own credentials. Here's the file layout :
```
<?xml version="1.0" encoding="UTF-8"?><commit_msg>README.md was fucked up as usual<commit_after># Discord-Streambot
A bot for Discord that alerts a channel when Twitch streams go live

Created by [Gyoo](http://twitter.com/GyooRunsStuff)

Join the [Discord server](https://discord.gg/0jXAp5dkKPSyUBFi) to invite Streambot to your server !

# How to use (Commands, process)

`!streambot <command>`

`commands` : List of available commands

`streams` : List of online streams (will send you a PM)

`add <option> <content>` : Add data to the bot (see options below)

`remove <option> <content>` : Remove data from the bot

`list <option>` : List data from the bot

`enable` : Activates bot after configuration

`disable` : Disactivates bot

`invite` : Gives an invite link so people can get the bot on their own server !

`move <channel>` : Moves the bot announces to another channel (Must use the #channel identifier !)

_Options_ :

`game` : Game name based on Twitch's list (must be the exact name to work !)

`channel` : Twitch channel name

`tag` : Word or group of words that must be present in the stream's title

`manager` : Discord user (must use the @ alias when using this option !)

**Recommended process**

*Streambot Server*

`!invite <invite link>` => Bot will join your server. __It will send the "NOW LIVE" announces in the channel from the invite link.__

*Your Server*

`!streambot add channel <Twitch channel>` if you want to add a single channel to Streambot. No link, only channel name (Example : `!streambot add channel gyoo_`)

`!streambot add game <Twitch game>` if you want Streambot to announce every stream with the given game(s). Game name must be the same as on Twitch, copy/pasting is recommended. (Example : `!streambot add game The Legend of Zelda: Twilight Princess`)

`!streambot add tag <Tag>` if you want to filter streams that only contain some tags in the title. (Example : `!streambot add tag speedrun`)

Once configured, `!streambot activate`

If you set both channels, games and tags, then streams will appear if __channel__ is playing __game__ with __tag__ in his title. Keep that in mind when configuring Streambot !

# Development, help

As I run out of free time, I decided to make the bot open source. I hope that people will be able to help me adding more features !

Please check the issues to see both bugs to fix and features to add !

If you have any questions (as the code is mostly not documented, I know it's bad), please hit me on the Streambot Discord server, link is above

## Credentials

To test the bot on your side, you will have to create an XML file with your own credentials. Here's the file layout :
```
<?xml version="1.0" encoding="UTF-8"?>
{'fraction_non_alphanumeric': 0.07835325365205843, 'fraction_numerical': 0.0018971732119142477, 'mean_word_length': 4.463212435233161, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 2, '>': 29, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3328139', 'n_tokens_mistral': 1512, 'n_tokens_neox': 1500, 'n_words': 810}