kevinbot 2.0
This is kevinbot. He is the chatbot at Intrepid.
Start
ruby kevinbot.rb
Make a new command
BaseCommand
. For example, if your command is /mycoolcommand
:
Create a new class named the same as your command inheriting from commands/mycoolcommand.rb
class Mycoolcommand < BaseCommand
#...
end
perform
method:
Craft your response to Slack in the commands/mycoolcommand.rb
class Mycoolcommand < BaseCommand
def perform
text = 'Look how cool this is'
end
end
respond
method:
Send it back to Slack with the commands/mycoolcommand.rb
class Mycoolcommand < BaseCommand
def perform
text = 'Look how cool this is'
respond(text)
end
end
Slack with these settings:
Make a new slash command onField | Value |
---|---|
Command | /rave |
URL | https://kevinbot2.herokuapp.com/ |
Method | POST |