Jérôme Deuchnord 053c716f9e | 3 年前 | |
---|---|---|
_twitchbot | 3 年前 | |
.gitignore | 3 年前 | |
Dockerfile | 3 年前 | |
LICENSE.md | 3 年前 | |
Pipfile | 3 年前 | |
Pipfile.lock | 3 年前 | |
README.md | 3 年前 | |
bot.py | 3 年前 | |
config.json.dist | 3 年前 | |
docker-compose.yml.dist | 3 年前 | |
logo.png | 3 年前 | |
logo.svg | 3 年前 |
Twason is an opinionated Twitch chatbot created with the KISS principle in mind. It is based on the IRC protocol and is configurable in just one JSON file.
Twason is a portmanteau based on two words: Twitch (the platform the bot is designed for) and Jason (as the JSON file that you use to wonfigure it).
Currently, Twason has the following features:
More features will be available in the future.
Twason is currently in development and may contain bugs, but it is globally usable. Actually, I’m using it on my Twitch channel.
The simplest (and safest) way to use it is to use the Docker image: deuchnord/twason
.
A Docker-Compose file is also available for facility.
To enable the bot to connect to Twitch chat, you will need to generate a token. Head to the Twitch Chat OAuth Password Generator and follow the instructions to generate it.
Then, you will need to give it to the bot through the TWITCH_TOKEN
environment variable.
To configure the bot, you will need to create a JSON file in config/config.json
as defined in the docker-compose.yml
file.
You can find a minimal configuration in the config.json.dist
file in this repository.
Below is the complete configuration reference:
{
"nickname": "yourbot", // the Twitch name of your bot
"channel": "yourchannel", // the channel the bot must follow
"command_prefix": "!", // the prefix the commands will have (defaults to '!')
"help": true, // if true, a help command will be automatically generated (defaults to true)
"commands": [ // a list of commands that your bot will recognize and respond to (empty by default)
{
"name": "ping", // the command name - spaces are not recommended here (even though they are technically accepted)
"message": "Pong @{author} Kappa" // the message the bot must send when someone invokes this command ('{author}' will be replaced with the user who invoked the command)
}
],
"timer": { // the configuration of the automatically sent messages
"between": {
"time": 10, // the minimum time that must have passed between two messages (defaults to 10)
"messages": 10 // the minimum number of messages that the chat members must have sent between two messages (defaults to 10)
},
"strategy": "round-robin", // the strategy used to send the messages: "round-robin" or "shuffle" (defaults to "round-robin")
"messages": [ // the list of messages to send (empty by default)
"Hello World! HeyGuys",
]
}
}