![]() In this example we have our "!hello" command from before, as well as one to echo messages and one to simulate rolling a six-sided die:Ĭlient.on('message', (channel, tags, message, self) =>. Replace the code in index.js with the following, which includes some basic logic for handling commands, which start with "!". We already covered saying hello, so let's check out a few more examples. Can Vivecraft be played via OpenComposite instead of SteamVR Vivecraft supports OpenComposite, however the latest versions of Vivecraft (as of July, 2019) require SteamVR Input support and OpenComposite does not yet support this API. Now that you can read and respond to messages sent from users in the chat, you can use your creativity to implement the logic for handling all sorts of different commands for whatever you want your bot to do. To install Vivecraft on either of these platforms, simply change the installer extension to. Run the code with index.js again, and try saying "!hello" in the chat to get a response:īecause I am using the same account for both it may appear as if I'm talking to myself but, one of those messages is automated and one is not. To avoid being rude and testing my bot in someone else's channel, I am going to connect to my own, but if you have any friends who are streaming it can be fun to connect to their streams. ![]() I am just going to use my personal account for this. This time you'll have to replace your_username with whatever Twitch account you're using to test this with, preferably one you created for your bot.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |