Skip to content

RecastAI/starwarsbot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Star Wars RPG bot with Bot Connector by Recast.AI!

alt text

  • You can find all the step to build this boat on this article

Set up your Recast.AI account

Create your bot
  • Log in to your Recast.AI account
  • Create a new bot
Get your token
  • In your profile, click your bot
  • In the tab-menu, click on the the little screw
  • Here is the request access token you will need to configure your bot!

Create your bot on Bot Connector

  • Bot Connector allows you to connect your bot to multiple channels at the same time with only one API integration.
  • Create a new account on Bot Connector or use your Recast.AI account

alt text

  • Let’s start by creating a new bot, pick a name you like.
  • To create the URL of you bot, create a webhook. That will create a tunnel from your bot to Bot Connector. We’re using a ngrok webhook, but you can use any kind of webhook you like.
  • if you don’t have ngrok, check this out to get started.
ngrok http 5000

alt text

  • Nice, you now have a first version of your bot! Now, let’s connect it to channels.

  • Bot Connector has two main zones:

  • in the orange selection, pick the channel you want

  • in the purple selection, configure your integration

  • In this tutorial, we’ll cover the Messenger integration, feel free to discover Slack and Kik on your own. 🙂

alt text

alt text

  • You now have a bot connected to Facebook!

Clone your bot

git clone https://github.com/RecastAI/starwarsbot

Run your bot

  • Go back to your bash and run your bot 🙂
vim config/index.js
const config = {}

config.recastToken = 'Recast token'
config.botToken = 'Bot token'
config.language = 'en'
config.url= 'https://api-botconnector.recast.ai'
config.botId = 'Bot id from bot-connector'
config.slug = 'Usename of bot-connector'
module.exports = config
npm install 
npm run start-dev

Author

Henri Floren - Recast.AI henri.floren@recast.ai

You can follow us on Twitter at @recastai for updates and releases.

License

Copyright (c) [2016] Recast.AI

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%