dota.py 文件源码

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

项目:Dota2HelperBot 作者: enoch-ng 项目源码 文件源码
def say_match_start(self, msg):
        serverlist = list(self.bot.servers)
        for s in serverlist:
            try: # Catching potential HTTPExceptions here is actually important, because if we don't then the background task will stop
                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 draft: %s" % e)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号