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)
评论列表
文章目录