Add leave confirm locale
This commit is contained in:
parent
8ecc456de3
commit
283720e168
4 changed files with 4 additions and 1 deletions
|
@ -90,6 +90,7 @@
|
|||
"core.message.help.table.header.base": "Base Module List",
|
||||
"core.message.help.table.header.external": "Extended Module List",
|
||||
"core.message.help.table.header.help": "Help",
|
||||
"core.message.leave.confirm": "This operation is irreversible. Are you sure?",
|
||||
"core.message.leave.success": "Goodbye.",
|
||||
"core.message.locale": "Current language: ${lang}",
|
||||
"core.message.locale.reload.failed": "Failed to reload the following string: ${detail}",
|
||||
|
|
|
@ -90,6 +90,7 @@
|
|||
"core.message.help.table.header.base": "基础模块列表",
|
||||
"core.message.help.table.header.external": "扩展模块列表",
|
||||
"core.message.help.table.header.help": "帮助信息",
|
||||
"core.message.leave.confirm": "此操作不可逆,你确定吗?",
|
||||
"core.message.leave.success": "已执行,再见。",
|
||||
"core.message.locale": "当前使用的语言:${lang}",
|
||||
"core.message.locale.reload.failed": "以下字符串重载失败:${detail}",
|
||||
|
|
|
@ -90,6 +90,7 @@
|
|||
"core.message.help.table.header.base": "基礎模組列表",
|
||||
"core.message.help.table.header.external": "擴充模組列表",
|
||||
"core.message.help.table.header.help": "說明資訊",
|
||||
"core.message.leave.confirm": "此行為不可逆,你確定嗎?",
|
||||
"core.message.leave.success": "已執行,再見。",
|
||||
"core.message.locale": "目前使用的語言:${lang}",
|
||||
"core.message.locale.reload.failed": "以下字串重新加載失敗:${detail}",
|
||||
|
|
|
@ -233,7 +233,7 @@ leave = module('leave', base=True, required_admin=True, available_for='QQ|Group'
|
|||
|
||||
@leave.command('{{core.help.leave}}')
|
||||
async def _(msg: Bot.MessageSession):
|
||||
confirm = await msg.wait_confirm(msg.locale.t('core.message.confirm'))
|
||||
confirm = await msg.wait_confirm(msg.locale.t('core.message.leave.confirm'))
|
||||
if confirm:
|
||||
await msg.send_message(msg.locale.t('core.message.leave.success'))
|
||||
await msg.call_api('set_group_leave', group_id=msg.session.target)
|
||||
|
|
Reference in a new issue