-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathmain.py
More file actions
27 lines (20 loc) · 651 Bytes
/
main.py
File metadata and controls
27 lines (20 loc) · 651 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from tasks import *
from microsoftbotframework import MsBot
import logging
log_format = "[%(asctime)s] %(levelname)s [%(name)s.%(funcName)s:%(lineno)d] %(message)s"
formatter = logging.Formatter(log_format)
streamHandler = logging.StreamHandler()
streamHandler.setLevel(logging.INFO)
streamHandler.setFormatter(formatter)
logging.basicConfig(
level=logging.INFO,
format=log_format)
bot = MsBot()
bot.add_process(respond_to_conversation_update)
bot.add_process(synchronous_response)
bot.add_process(asynchronous_response)
log = bot.logger
log.setLevel(logging.INFO)
log.addHandler(streamHandler)
if __name__ == '__main__':
bot.run()