Beispiel #1
0
 def add(self, message, match):
     if self._is_authorized(message):
         jid_add = self._get_jid(match.group("phone_number"))
         self._add_user(message.getFrom(), jid_add)
         time.sleep(1)
         try:
             self.interface_layer.toLower(
                 TextMessageProtocolEntity(get("welcome"),
                                           to=message.getFrom()))
         except:
             self.interface_layer.toLower(
                 TextMessageProtocolEntity(get("welcome"),
                                           to=message.getFrom()))
Beispiel #2
0
 def f_help(self, message=None, match=None, to=None):
     return TextMessageProtocolEntity(get("fun"), to=message.getFrom())
Beispiel #3
0
 def list_comic(self, message=None, match=None, to=None):
     return TextMessageProtocolEntity(get("comic"), to=message.getFrom())
Beispiel #4
0
 def list_story(self, message=None, match=None, to=None):
     return TextMessageProtocolEntity(get("story"), to=message.getFrom())
 def youtube(self, message=None, match=None, to=None):
     return TextMessageProtocolEntity(get("y_menu"), to=message.getFrom())
 def about(self, message=None, match=None, to=None):
     return TextMessageProtocolEntity(get("about"), to=message.getFrom())
 def py2(self, message=None, match=None, to=None):
     return TextMessageProtocolEntity(get("python2"), to=message.getFrom())
 def link(self, message=None, match=None, to=None):
     return TextMessageProtocolEntity(get("link"), to=message.getFrom())
 def help2(self, message=None, match=None, to=None):
     return TextMessageProtocolEntity(get("home2"), to=message.getFrom())