Skip to content

Instantly share code, notes, and snippets.

@MKtalk
Last active January 27, 2018 07:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MKtalk/20e0d6d33777890d150947ba0db9dadf to your computer and use it in GitHub Desktop.
Save MKtalk/20e0d6d33777890d150947ba0db9dadf to your computer and use it in GitHub Desktop.
BotHub.Studio new style
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function, unicode_literals)
from bothub_client.bot import BaseBot
from bothub_client.decorators import channel, command
@channel()
def default_handler(self, event, context):
self.send_message('default message')
@command('start')
def start_message(self, event, context):
self.send_message('Hello')
@command('help')
def help_message(self, event, context):
self.send_message('Can I help you?')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment