2016-11-27 53 views
1

如何在比赛结束后停止处理消息? 例如是这样的:在Errbot匹配后停止处理消息

@re_botcmd(pattern=r"(.*)(damn|fuck|stupid)(.*)$", flags=re.IGNORECASE,matchall=True) 
    def be_nice(self, msg, match): 
     yield "Could you be more nice (((?" 
     stop_processing_msg(msg) 

也就是有办法orginize匹配,因此它可以在特定的顺序来完成?

回答

0

对于这个特定的功能,我会用一个命令过滤器:http://errbot.io/en/latest/errbot.html#errbot.cmdfilter

直接将消息发送给用户,你这里有机会阻止处理。

至于解释的订单,我们没有一个完整的解决方案,但尚未有:

+0

谢谢,这有助于。 – arykalin