registry.py 文件源码

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

项目:PomodoroBot 作者: VicenteRD 项目源码 文件源码
def check_last(self, ctx: commands.Context, name):
        """ Shows you how long other users' last session lasted.

            :param name: The name (not the nick) of the person to check.
            Must use the name#discriminator format.
        """
        time_str = printable_time(db_manager.get_user_last_session(name))
        if time_str is None:
            time_str = "None found."

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


问题


面经


文章

微信
公众号

扫码关注公众号