Use '/helloworld' slash command to trigger a bot sending "Hello World" message to the chat.
- To recreate this app, fork and clone this repo git clone
- Install ngrok
- In the directory where you downloaded ngrok, run ./ngrok http 8080
- Create your new Flock App here
- Give your app a name and description, click save.
- Click to expand Advanced Info section
- Event listener URL should be your ngrok https url, + '/events' (ie. 'https://.ngrok.io/events')
- Make sure it's https!
- Turn Slash Command on, give it a slash command (just the word, no slash before it here) and description
- Select slash command action "Send to event listener URL"
- Enable bot
- Click save for this section (important!)
- Copy the App Id, App Secret, Bot Id, and Bot Secret for you config.js file (how to format this config.js below)
- Click Save for Publish your app on Flock App store (you can leave it private, or select team-only install if you want team members to be able to download it too).
After you've created your new Flock App here, you will find the following ID's and tokens for your config.js file.
Since config.js is in the gitignore, you'll have to first create the file, then add the following:
module.exports = {
appId: <your app id>,
appSecret: <your app secret>,
botUserId: <your bot id>,
botToken: <your bot token>
};- In your project directory, run node index.js
- Once you have your config.js file setup, click install on the top of the page where you setup your app! (If you've navigated away, it's under the Flock Apps >> Your Apps section when you go to Build Apps)
- You should see the install event appear on your server!
- Type /helloworld in your chat
- 🎉 🎉 Magic happens 🎉 🎉

