casino.py 文件源码

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

项目:Jumper-Cogs 作者: Redjumpman 项目源码 文件源码
def _paydaytimer_setcasino(self, ctx, seconds: int):
        """Set the cooldown on payday

        This timer is not affected by cooldown reduction from membership.
        """

        author = ctx.message.author
        settings = super().check_server_settings(author.server)

        if seconds >= 0:
            settings["System Config"]["Payday Timer"] = seconds
            super().save_system()
            time_set = self.time_format(seconds)
            msg = _("{} set the default payday to {}.").format(author.name, time_set)
            logger.info("SETTINGS CHANGED {}({}) {}".format(author.name, author.id, msg))
        else:
            msg = (_("You cannot set a negative number to payday timer. That would be like going "
                     "back in time. Which would be totally cool, but I don't understand the "
                     "physics of how it might apply in this case. One would assume you would go "
                     "back in time to the point in which you could receive a payday, but it is "
                     "actually quite the opposite. You would go back to the point where you were "
                     "about to claim a payday and thus claim it again, but unfortunately your "
                     "total would not receive a net gain, because you are robbing from yourself. "
                     "Next time think before you do something so stupid."))

        await self.bot.say(msg)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号