

This ends the code block for this command.For example: 'This is a string that contains an apostrophe ' that everyone can see!'.Anything inside this function will be sent to the group, and if you want to include apostrophies in the message make sure to escape them using \.This bot sends messages to the Group using tools.say, which you can learn more about by taking a look in the tools.js file.Here, "case 'joke':" lets the bot know that if anyone types the phrase between the apostrophies, joke, then it will run the code inside this case code block.Tools.say('Why did the chicken cross the road? To get to the other side!') To add another command, simply add another case. These commands are triggered when a user types !anything with the word after the ! being taken as a command. Allows for users to use a command to specific users (in this case officers of an organization).Īdding more commands is relatively simple, even if you don't know Javascript or have no experience coding.įirst navigate to index.js and find the line begins the switch statement.To enable this feature the variable must be set to "enabled".Turning on admin only mode will only allow admins to use any command.Set a custom port for your bot, defaults to 5000 if not set.If they aren't set they are disabled by default. SettingsĪdditional, optional settings that can be set on the bot using config vars on Heroku. If you would like to try using Git instead you can check our their article here.Ĭongratulations! Once you save those variables and linked your bot to a repository it should be fully functional, you can or try commands such as !help.
#OCELOT CHATBOT UPDATE#
You can manually deploy updates using the "Deploy Branch" button, or automatically update your bot every time you update the code in your repository with "Enable Automatic Deploys".įor more information on Heroku-GitHub integration see their docs. I prefer using GitHub, but you can try using the other code hosting methods.Īfter clicking "Connect to GitHub" and linking up your account you can select the repository with the correct code and link it with your Heroku application. Next go to Deploy, and scroll down to Deployment Method. Scroll down to Config Vars and click "Reveal Config Vars", then input the following settings: Navigate to your application on Heroku and go to Settings. Keep in mind, these are sensitive pieces of information and should not be shared with anyone! Finishing Heroku Application setupĪt this point, you should have written down or otherwise accesable: Once logged in, your dashboard should display your KVStore.io API key (or it may be obfuscated). Navigate to KVStore.io and set up an account.

On this page your bot should have a Bot ID and a Group ID.įinally, you will need your GroupMe Token which can be accessed on any GroupMe developer page in the top right (click on Access Token Setting up KVStore.io

Once you submit the form a new bot should be created and you should be brought back to the GroupMe bots page.

Navigate to Heroku's App Dashboard and click New -> Create new app.
#OCELOT CHATBOT FREE#
In order to set up an ocelot bot for your chat you must set up a Heroku account and a KVStore.io account.īoth of these are free and allow us to host our bot and store a tiny bit of data! Creating the Bot on Heroku Feel free to use the issues tab to ask any questions you have and I'll try my best to explain! This is the public version that I only update occasionally whenever a new feature is added and bug free. This bot can be hosted on Heroku and with a KVStore.io key you can have a small amount of storage to keep track of things between saves. GroupMe bot developed for use in my dorm GroupMe.
