streamlock.py 文件源码

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

项目:Tobo-Cogs 作者: Tobotimus 项目源码 文件源码
def streamlock_unlockmsg(self,
                                   ctx: commands.Context,
                                   *,
                                   message: str=None):
        """Set the message for when the channel is unlocked.

        Leave <message> blank to see the current message.

        To include the name of the stream in the message, simply
         use the placeholder {stream} in the message."""
        channel = ctx.message.channel
        settings = self._load(channel=channel)
        if message is None:
            await self.bot.send_cmd_help(ctx)
            await self.bot.say("Current message:\n{}"
                               "".format(box(settings["UNLOCK_MSG"])))
            return
        settings["UNLOCK_MSG"] = message
        await self.bot.say("Done. Sending test message here...")
        await self.send_lock_msg("ExampleStream", channel, unlock=True)
        self._save(settings, channel=channel)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号