3
0

v0.3.2 运行更多命令在私聊运行

This commit is contained in:
xtaodada 2022-01-28 20:12:46 +08:00
parent 334d62b8f4
commit 400da8bb3c
No known key found for this signature in database
GPG Key ID: EE4DC37B55E24736
4 changed files with 75 additions and 7 deletions

View File

@ -62,6 +62,36 @@ async def mihoyo_msg(client: Client, message: Message):
except Exception as e:
traceback.print_exc()
await message.reply("未找到uid绑定记录。", quote=True)
elif "签到" in text:
try:
uid = await selectDB(message.from_user.id, mode="uid")
uid = uid[0]
im = await sign(uid)
await message.reply(im, quote=True)
except Exception as e:
traceback.print_exc()
await message.reply('未找到绑定信息', quote=True)
elif "效验全部" in text:
im = await CheckDB()
await message.reply(im, quote=True)
elif "当前状态" in text:
try:
uid = await selectDB(message.from_user.id, mode="uid")
uid = uid[0]
mes = await daily("ask", uid)
im = mes[0]['message']
except Exception as e:
traceback.print_exc()
im = "没有找到绑定信息。"
await message.reply(im, quote=True)
elif "绑定uid" in text:
uid = text.replace("绑定uid", "") # str
await connectDB(message.from_user.id, uid)
await message.reply('绑定uid成功', quote=True)
elif "绑定mys" in text:
mys = text.replace("绑定mys", "") # str
await connectDB(message.from_user.id, None, mys)
await message.reply('绑定米游社id成功', quote=True)
async def mihoyo_qun_msg(client: Client, message: Message):

View File

@ -70,6 +70,45 @@ async def mys2_msg(client: Client, message: Message):
except Exception as e:
traceback.print_exc()
await message.reply("未找到uid绑定记录。", quote=True)
elif "每月统计" in text:
try:
uid = await selectDB(message.from_user.id, mode="uid")
uid = uid[0]
im = await award(uid)
await message.reply(im, quote=True)
except Exception as e:
traceback.print_exc()
await message.reply('未找到绑定信息', quote=True)
elif "签到" in text:
try:
uid = await selectDB(message.from_user.id, mode="uid")
uid = uid[0]
im = await sign(uid)
await message.reply(im, quote=True)
except Exception as e:
traceback.print_exc()
await message.reply('未找到绑定信息', quote=True)
elif "当前状态" in text:
try:
uid = await selectDB(message.from_user.id, mode="uid")
uid = uid[0]
mes = await daily("ask", uid)
im = mes[0]['message']
except Exception as e:
traceback.print_exc()
im = "没有找到绑定信息。"
await message.reply(im, quote=True)
elif "绑定uid" in text:
uid = text.replace("绑定uid", "") # str
if is_chinese(uid):
await connectDB(message.from_user.id, uid)
await message.reply('绑定uid成功', quote=True)
else:
await message.reply("非国区uid", quote=True)
elif "绑定mys" in text:
mys = text.replace("绑定mys", "") # str
await connectDB(message.from_user.id, None, mys)
await message.reply('绑定米游社id成功', quote=True)
async def mys2_qun_msg(client: Client, message: Message):

View File

@ -2,7 +2,7 @@ from ci import admin_id
from pyrogram import Client
from pyrogram.types import Message, CallbackQuery, InlineKeyboardMarkup, InlineKeyboardButton
HELP_MSG_PRE = '<a href="https://git.io/JcbTD">PaimonBot</a> 0.3.1beta By Xtao-Labs\n\n' \
HELP_MSG_PRE = '<a href="https://git.io/JcbTD">PaimonBot</a> 0.3.2beta By Xtao-Labs\n\n' \
'🔅 以下是小派蒙我学会了的功能(部分):\n'
HELP_MSG = """① [武器/今日武器] 查看今日武器材料和武器
[天赋/今日天赋] 查看今日天赋材料和角色
@ -32,11 +32,11 @@ HELP_MSG = """① [武器/今日武器] 查看今日武器材料和武器
💠 <code>米游社添加私聊</code>
💠 <code>米游社推送开启/关闭</code>
💠 <code>米游社自动签到开启/关闭</code>
💠 <code>米游社每月统计群聊</code>
💠 <code>米游社签到群聊</code>
💠 <code>米游社当前状态群聊</code>
💠 <code>米游社绑定uid+游戏uid群聊</code>
💠 <code>米游社绑定mys+米游社id群聊</code>
💠 <code>米游社每月统计</code>
💠 <code>米游社签到</code>
💠 <code>米游社当前状态</code>
💠 <code>米游社绑定uid+游戏uid</code>
💠 <code>米游社绑定mys+米游社id</code>
💠 <code>米游社uid+游戏uid支持自定义图片群聊</code>
💠 <code>米游社mys+米游社id支持自定义图片群聊</code>
💠 <code>米游社查询支持回复自定义图片群聊</code>

View File

@ -7,7 +7,6 @@ beautifulsoup4>=4.9.3
requests>=2.27.1
xpinyin>=0.7.6
lxml>=4.6.3
httpx>=0.21.3
pyyaml>=6.0
httpx>=0.18.1
apscheduler>=3.8.1