dota.py 文件源码

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

项目:Dota2HelperBot 作者: enoch-ng 项目源码 文件源码
def say_victory_message(self, msg_winner, msg_no_winner):
        serverlist = list(self.bot.servers)
        for s in serverlist:
            if self.get_victory_messages(s):
                try:
                    msg = msg_winner if self.get_show_result(s) else msg_no_winner
                    matches_channel = self.bot.get_channel(self.get_matches_channel(s))
                    if matches_channel:
                        try:
                            await self.bot.send_message(matches_channel, msg)
                        except (discord.Forbidden, discord.NotFound, discord.InvalidArgument):
                            pass
                except discord.HTTPException:
                    pass
                #except Exception as e:
                #   print("Unable to announce end of match: %s" % e)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号