Skip to content

OffCourse/bots-with-an-attitude

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

steps to make this work:

  1. Install Dependencies

    yarn
    yarn build
  2. Make sure you register your app with the slack events api (listen at least for these three events: ["message.channels", "message.groups", "message.im"]) and update the /packages/protobot/.env.sample with your credentials and save it as .env. Instructions can be found here

  3. Test locally from the protobot dir with yarn start. Use ngrok to forward your port 3333. Update your slack config with the ngrok url + /webhooks/slack

  4. Your protobot needs to be initialized first. This can be done with the grapqhl api. Docs are in the playground. But it's basically one command:

    mutation Init($input:BWAEvent!){
      sendEvent(event: $input){
        currentState
      }
    }

    and input variables

    {
      "input":{
         "eventType": "INITIALIZED",
         "payload": {
           "botName": "HELOO",
           "cassettes": ["stgjasds"]
         }
       }
     }
  5. Hook your own code into the botframe/machine/routes module. I'm using the bottender botframe work under the hood. You only have to add the correct actions. Docs are here and here

  6. There is a dockerfile in the root dir. This can be used to deploy your protobot once your done.

    docker build -t @offcourse/protobot .
    docker run docker run -p 80:3333 -d offcourse/protobot

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published