(self, message_info)
return reply and reply.reply(message_info)
:type message_info: wechat_django.models.WeChatMessageInfo
        :rtype: wechatpy.replies.BaseReply
:type message_info: wechat_django.models.WeChatMessageInfo
        :rtype: wechatpy.replies.BaseReply
: type message_info : wechat_django . models . WeChatMessageInfo : rtype : wechatpy . replies . BaseReply
def reply(self, message_info):
        """
        :type message_info: wechat_django.models.WeChatMessageInfo
        :rtype: wechatpy.replies.BaseReply
        """
        reply = ""
        if self.strategy == self.ReplyStrategy.NONE:
            pass
        else:
            replies = list(self.replies.all())
            if not replies:
                pass
            elif self.strategy == self.ReplyStrategy.REPLYALL:
                for reply in replies[:-1]:
                    try:
                        reply.send(message_info)
                    except Exception as e:
                        # 发送异常 继续处理其他程序
                        log = self.handlerlog(message_info.request)
                        msg = "an unexcepted error occurred when send msg"
                        level = logging.WARNING\
                            if isinstance(e, WeChatClientException)\
                            else logging.ERROR
                        log(level, msg, exc_info=True)
                reply = replies[-1]
            elif self.strategy == self.ReplyStrategy.RANDOM:
                reply = random.choice(replies)
            else:
                raise MessageHandleError("incorrect reply strategy")
        return reply and reply.reply(message_info)
def reply ( self , message_info ) : reply = "" if self . strategy == self . ReplyStrategy . NONE : pass else : replies = list ( self . replies . all ( ) ) if not replies : pass elif self . strategy == self . ReplyStrategy . REPLYALL : for reply in replies [ : - 1 ] : try : reply . send ( message_info ) except Exception as e : # 发送异常 继续处理其他程序 log = self . handlerlog ( message_info . request ) msg = "an unexcepted error occurred when send msg" level = logging . WARNING if isinstance ( e , WeChatClientException ) else logging . ERROR log ( level , msg , exc_info = True ) reply = replies [ - 1 ] elif self . strategy == self . ReplyStrategy . RANDOM : reply = random . choice ( replies ) else : raise MessageHandleError ( "incorrect reply strategy" ) return reply and reply . reply ( message_info )