예제 #1
0
 def link(self, message=None, match=None, to=None):
     return TextMessageProtocolEntity(LINK_TEXT, to=message.getFrom())
예제 #2
0
 def help(self, message=None, match=None, to=None):
     return TextMessageProtocolEntity(ticker_help, to=message.getFrom())
예제 #3
0
 def gdnit(self, message=None, match=None, to=None):
     return TextMessageProtocolEntity("Good Night!! 🙂",
                                      to=message.getFrom())
예제 #4
0
 def btc(self, message=None, match=None, to=None):
     return TextMessageProtocolEntity(BTC_TEXT, to=message.getFrom())
예제 #5
0
 def roll(self, message=None, match=None, to=None):
     return TextMessageProtocolEntity("[%d]" % random.randint(1, 6),
                                      to=message.getFrom())
예제 #6
0
 def help(self, message=None, match=None, to=None):
     return TextMessageProtocolEntity(HELP_TEXT, to=message.getFrom())
예제 #7
0
 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())
예제 #8
0
 def calculator(self, message=None, match=None, to=None):
     num = match.group("num")
     total = eval(num)
     return TextMessageProtocolEntity("Result = " + str(total),
                                      to=message.getFrom())
예제 #9
0
 def ask(self, message=None, match=None, to=None):
     q = match.group("question").lower()
     q = "Under Development"
     return TextMessageProtocolEntity(q, to=message.getFrom())
예제 #10
0
 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())
예제 #11
0
 def tv(self, message=None, match=None, to=None):
     return TextMessageProtocolEntity(get("tv"), to=message.getFrom())
예제 #12
0
 def say(word):
     self.interface_layer.toLower(
         TextMessageProtocolEntity(word, to=message.getFrom()))
예제 #13
0
 def echo(self, message=None, match=None, to=None):
     msg = match.group("msg")
     return TextMessageProtocolEntity(msg, to=message.getFrom())
예제 #14
0
 def zebpay(self, message=None, match=None, to=None):
     text = match.group("currency")
     result = zebpay.get(text)
     return TextMessageProtocolEntity(result, to=message.getFrom())
예제 #15
0
 def about(self, message=None, match=None, to=None):
     return TextMessageProtocolEntity(ABOUT_TEXT, to=message.getFrom())
예제 #16
0
 def help1(self, message=None, match=None, to=None):
     return TextMessageProtocolEntity(get("home1"), to=message.getFrom())
예제 #17
0
 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())