OSDN Git Service

dummy for acm
authoryamat0jp <yamat0jp@yahoo.co.jp>
Sat, 1 Sep 2018 12:37:26 +0000 (21:37 +0900)
committeryamat0jp <yamat0jp@yahoo.co.jp>
Sat, 1 Sep 2018 12:37:26 +0000 (21:37 +0900)
bot.py

diff --git a/bot.py b/bot.py
index 12da3a4..3eb08f0 100644 (file)
--- a/bot.py
+++ b/bot.py
@@ -35,8 +35,12 @@ class WebHookHandler(tornado.web.RequestHandler):
                 TextSendMessage(text=event.message.text)
             )
         self.set_status(200)
+        
+class DummyHandler(tornado.web.RequestHandler):
+    def get(self):
+        self.write('OK')
 
-application = tornado.web.Application([(r'/callback',WebHookHandler)])
+application = tornado.web.Application([(r'/callback',WebHookHandler),(r'/',DummyHandler)])
 
 if __name__ == '__main__':
     token = os.environ['Access_Token']