general.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:MangoByte 作者: mdiller 项目源码 文件源码
def ask(self, ctx, *, question : str=""):
        """Answers any question you might have"""
        random.seed(question)
        for check in self.questions:
            if re.search(check["regex"], question):
                clip = await self.get_clip(f"dota:{random.choice(check['responses'])}", ctx)
                await ctx.send(clip.text)
                try:
                    await self.play_clip(clip, ctx)
                except AudioPlayerNotFoundError:
                    pass # Not needed for this 
                return
        print("didnt match anything for ask")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号