def total(self, ctx: commands.Context, name=None):
""" Shows you the total time a user has used the timer for.
:param name: The name (not the nick) of the person to check.
Must use the name#discriminator format. If none is provided, it will
check your own record.
"""
if name is None:
name = ctx.message.author
time_str = printable_time(db_manager.get_user_total(name))
if time_str is None:
time_str = "None found."
name = str(name)
lib.log("{} queried for {}'s last session time. Result: {}"
.format(lib.get_author_name(ctx, True),
"their" if name == str(ctx.message.author)
else (name + "'s"), time_str))
await self.bot.say("```{}```".format(time_str),
delete_after=self.bot.ans_lifespan * 3)
评论列表
文章目录