tomaarsen / TwitchMarkovChain

Twitch Bot for generating messages based on what it learned from chat
MIT License
118 stars 25 forks source link

Support for the bot speaking without having to type !g or !generate? #8

Closed jthorn70 closed 3 years ago

jthorn70 commented 3 years ago

Not a very important feature but could be neat to have the bot just keep talking with a cooldown between messages.

tomaarsen commented 3 years ago

That would definitely be interesting. I got another feature request about whispers a while ago, and I thought of some other changes I could add too. I'm going to add some issues for those as well and then see what I can build in.

Thank you for the idea!

I'm definitely open to people suggesting ideas/features, or creating pull requests with implementations.

tomaarsen commented 3 years ago

Hello @jthorn70

I've implemented your suggestion! If you download the new version, and keep using your existing settings.txt, then it will be automatically updated to add:

...
    "HelpMessageTimer": 7200,
    "AutomaticGenerationTimer": -1
}

These new settings (as the updated README explains) are intervals between messages the bot automatically posts. The first one is a 7200 second interval (2 hours) between posting a message that links to the README so chat members can read up how the bot works. Though I believe many chatters would find this useful, streamers keep the option to remove this help message by setting the value to -1 (indicating "no messages of this type")

This -1 is also the default for "AutomaticGenerationTimer", which is what this suggestion is about. It is the interval in seconds between automatic generations. So, if you set it to 900, the bot will post a generation every 15 minutes. Again, this is not something all streamers will want, so you can turn it off by setting it to -1.

So, download the new version, use the old settings.txt, run the program once so it updates the settings.txt, then set the value for "AutomaticGenerationTimer" to your desired interval, and run the program again.

I hope this is satisfactory!