def link(self, message=None, match=None, to=None): return TextMessageProtocolEntity(LINK_TEXT, to=message.getFrom())
def help(self, message=None, match=None, to=None): return TextMessageProtocolEntity(ticker_help, to=message.getFrom())
def gdnit(self, message=None, match=None, to=None): return TextMessageProtocolEntity("Good Night!! 🙂", to=message.getFrom())
def btc(self, message=None, match=None, to=None): return TextMessageProtocolEntity(BTC_TEXT, to=message.getFrom())
def roll(self, message=None, match=None, to=None): return TextMessageProtocolEntity("[%d]" % random.randint(1, 6), to=message.getFrom())
def help(self, message=None, match=None, to=None): return TextMessageProtocolEntity(HELP_TEXT, to=message.getFrom())
def cal(self, message=None, match=None, to=None): now = str(datetime.now()) cal = calendar.month(2017, 6) return TextMessageProtocolEntity("Here is the calendar:\n" + now + "\n" + cal, to=message.getFrom())
def calculator(self, message=None, match=None, to=None): num = match.group("num") total = eval(num) return TextMessageProtocolEntity("Result = " + str(total), to=message.getFrom())
def ask(self, message=None, match=None, to=None): q = match.group("question").lower() q = "Under Development" return TextMessageProtocolEntity(q, to=message.getFrom())
def time(self, message=None, match=None, to=None): localtime = time.asctime(time.localtime(time.time())) return TextMessageProtocolEntity("Local current time :" + str(localtime), to=message.getFrom())
def tv(self, message=None, match=None, to=None): return TextMessageProtocolEntity(get("tv"), to=message.getFrom())
def say(word): self.interface_layer.toLower( TextMessageProtocolEntity(word, to=message.getFrom()))
def echo(self, message=None, match=None, to=None): msg = match.group("msg") return TextMessageProtocolEntity(msg, to=message.getFrom())
def zebpay(self, message=None, match=None, to=None): text = match.group("currency") result = zebpay.get(text) return TextMessageProtocolEntity(result, to=message.getFrom())
def about(self, message=None, match=None, to=None): return TextMessageProtocolEntity(ABOUT_TEXT, to=message.getFrom())
def help1(self, message=None, match=None, to=None): return TextMessageProtocolEntity(get("home1"), to=message.getFrom())
def have(self, message=None, match=None, to=None): url = "http://jarbot.top/bot/test13.txt" data = requests.get(url) data = data.text return TextMessageProtocolEntity(a, to=message.getFrom())