Skip to content

Commit

Permalink
Update message.py
Browse files Browse the repository at this point in the history
  • Loading branch information
DoroWolf committed Jan 4, 2025
1 parent 32bafca commit 66ba1c5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions core/parser/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,12 @@ async def parser(msg: Bot.MessageSession,
await msg.send_message(
msg.locale.t("parser.module.disabled.prompt", module=command_first_word,
prefix=msg.prefixes[0]))
if all([await msg.check_permission(),
await msg.wait_confirm(msg.locale.t("parser.module.disabled.to_enable"), quote=False),
msg.data.enable(command_first_word)]):
await msg.send_message(msg.locale.t("core.message.module.enable.success", module=command_first_word))
if await msg.check_permission():
if await msg.wait_confirm(msg.locale.t("parser.module.disabled.to_enable")):
msg.data.enable(command_first_word)
await msg.send_message(msg.locale.t("core.message.module.enable.success", module=command_first_word))
else:
return
else:
return
elif module.required_admin:
Expand Down

0 comments on commit 66ba1c5

Please sign in to comment.