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