-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.py
More file actions
33 lines (24 loc) · 726 Bytes
/
Copy pathtest.py
File metadata and controls
33 lines (24 loc) · 726 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
28
29
30
31
32
33
#! /usr/bin/env python
# coding:utf-8
from kovot.mod import Mod
from kovot.response import Response
from kovot.bot import Bot
from kovot.stream.stdio import StdIO
class EchoMod(Mod):
def get_responses(self, bot, message):
res = Response(score=1.0,
text=message.text,
message=message,
source=self.__class__.__name__)
return [res]
if __name__ == "__main__":
from logging import basicConfig, INFO
basicConfig(
level=INFO,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
)
# mods
mods = [EchoMod()]
kovot = Bot(mods=mods)
stdin_stream = StdIO()
kovot.run(stdin_stream)