Support privacy policy

This commit is contained in:
xtaodada 2024-08-02 18:39:07 +08:00
parent fe08fce69a
commit 1841e60f6d
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
2 changed files with 10 additions and 0 deletions

View File

@ -39,6 +39,7 @@ class SetCommandPlugin(Plugin):
BotCommand("setcookie", "添加/重设Cookie"),
BotCommand("player", "管理用户绑定玩家"),
BotCommand("verify", "手动验证"),
BotCommand("privacy", "隐私政策"),
]
group_command = [
# 通用

View File

@ -1,4 +1,5 @@
from telegram import Update, ReplyKeyboardRemove
from telegram.constants import ParseMode
from telegram.ext import CallbackContext, CommandHandler
from telegram.helpers import escape_markdown
@ -36,3 +37,11 @@ class StartPlugin(Plugin):
@handler(CommandHandler, command="reply_keyboard_remove", block=False)
async def reply_keyboard_remove(self, update: Update, _: CallbackContext) -> None:
await update.message.reply_text("移除远程键盘成功", reply_markup=ReplyKeyboardRemove())
@handler.command(command="privacy", block=False)
async def reply_privacy_policy(self, update: "Update", _: "CallbackContext"):
message = update.effective_message
await message.reply_text(
"请查看[PaiGramTeam Bot 用户个人信息及隐私保护政策](https://telegra.ph/paigramteam-bot-privacy-08-02)",
parse_mode=ParseMode.MARKDOWN_V2,
)