bot.py 文件源码

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

项目:PomodoroBot 作者: VicenteRD 项目源码 文件源码
def update_status(self):
        """ Updates the status of the bot user to display the amount of
            timers running, if any, or show the bot as idle if none are.
        """

        if self.timers_running == 0:
            await self.change_presence(game=None, status=Status.idle)

        else:
            game = discord.Game()
            channels = lib.pluralize(self.timers_running, "channel", append="s")
            game.name = ("on " + channels)

            await self.change_presence(game=game, status=Status.online)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号