feat: add 'clear_when_stop_in_oneshot' option in config for azlux

This commit is contained in:
Terry Geng
2020-03-20 10:49:44 +08:00
parent 4e287d6b1b
commit 1d1ff50a59
4 changed files with 13 additions and 2 deletions
+5 -1
View File
@@ -565,7 +565,11 @@ def cmd_help(bot, user, text, command, parameter):
def cmd_stop(bot, user, text, command, parameter):
global log
bot.stop()
if var.config.getboolean("bot", "clear_when_stop_in_oneshot", fallback=False) \
and var.playlist.mode == 'one-shot':
cmd_clear(bot, user, text, command, parameter)
else:
bot.stop()
bot.send_msg(constants.strings('stopped'), text)