def __init__(self): __source__ = loader(path='/bin/config.json') self._token = __source__['line']["token"] self._secret = __source__['line']["secret"] self._static_url = __source__["static_url"] self._static_folder = __source__["static_folder"]
class Otherwise(object): source = loader(path='/bin/exp.json')['otherwise']
class Excotan(object): source = loader(path='/bin/exp.json')['excotan']
class Qhamburg(object): source = loader(path='/bin/exp.json')['qhamburg']
""" チャットボット コア クラス """ __author__ = 'kuro3 <*****@*****.**>' __status__ = 'production' __version__ = '0.1.0' __date__ = '2018.8.22' import difflib import unicodedata import random from io import StringIO from common.helper import (Switch, loader) __ratio_value__ = float(loader(path='/bin/config.json')["ratio_value"]) class Core: def __init__(self): self._ex = ExcChecker() self._dictionary = {} self._response = Response(Switch.Nothing) def buffer(self, _id, _text): _buff = StringIO() if _id in self._dictionary.keys(): _buff.write(self._dictionary[_id]) _buff.write(_text)