Giter Site home page Giter Site logo

twitchrhymebot's Introduction

TwitchRhymeBot

Twitch bot that periodically responds to messages with a rhyme


Note

This program relies on a database generated by an outdated version of the TwitchMarkovChain program. As a result, this program cannot easily be used.


Explanation

When the bot has started, it will start listening to chat messages in the channel listed in the settings.txt file. Every "cooldown" seconds, as listed in the settings.txt file, the bot will respond to a message with a rhyme. The bot will try to ensure that the sound of the final word of the input message from the random chat user and the output message from the bot have the same sound. It will also try to match the syllable count of both messages.


Example


Input:  "its kinda useless"
Output: "Good job regardless"

Input:  "Face your crimes!"
Output: "were great times"

Input:  "bloody and stuff"
Output: "This game is tough"

Settings

This bot is controlled by a settings.txt file, which looks like:

{
    "Host": "irc.chat.twitch.tv",
    "Port": 6667,
    "Channel": "#<channel>",
    "Nickname": "<name>",
    "Authentication": "oauth:<auth>",
    "Cooldown": 300
}
Parameter Meaning Example
Host The URL that will be used. Do not change. "irc.chat.twitch.tv"
Port The Port that will be used. Do not change. 6667
Channel The Channel that will be connected to. "#CubieDev"
Nickname The Username of the bot account. "CubieB0T"
Authentication The OAuth token for the bot account. "oauth:pivogip8ybletucqdz4pkhag6itbax"
Cooldown The cooldown between rhymes in seconds. 300

Note that the example OAuth token is not an actual token, but merely a generated string to give an indication what it might look like.

I got my real OAuth token from https://twitchapps.com/tmi/.


Usage

Run the RhymeBot.py file


Dependencies

This bot relies on having a MarkovChain_xxx.db file being in the same folder as the .py files. More generally, this bot relies on the TwitchMarkovChain bot being run in the same folder, to create a database of sentences.


Requirements

Among these modules is my own TwitchWebsocket wrapper, which makes making a Twitch chat bot a lot easier. This repository can be seen as an implementation using this wrapper.


Other Twitch Bots

twitchrhymebot's People

Contributors

tomaarsen avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

jae1379

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.