feat(tarot): 移除调试打印语句

fix(who_say): 增加输入内容为空校验
chore(fortune): 移除未使用的导入
This commit is contained in:
SlyAimer 2025-02-09 19:48:02 +08:00
parent 205918fd75
commit f79eaaae1c
3 changed files with 2 additions and 3 deletions

View file

@ -43,7 +43,6 @@ class MajorArcana(Model):
await cls.bulk_create(Major_arcana_initial_data) await cls.bulk_create(Major_arcana_initial_data)
arcana = await cls.all() arcana = await cls.all()
tarots = random.choice(arcana) tarots = random.choice(arcana)
print(tarots.image)
# 正位 # 正位
if ints == 0: if ints == 0:
return await MajorArcanaLog.insertTarotLog(tarots, user_id, tarots_img_path+tarots.image,"正位") return await MajorArcanaLog.insertTarotLog(tarots, user_id, tarots_img_path+tarots.image,"正位")

View file

@ -4,7 +4,7 @@ from nonebot.rule import to_me
from nonebot.plugin import on_command from nonebot.plugin import on_command
from nonebot.adapters.qq import Message, MessageEvent, MessageSegment,exception from nonebot.adapters.qq import Message, MessageEvent, MessageSegment,exception
from src.clover_image.get_image import get_image_names from src.clover_image.get_image import get_image_names
from src.clover_sqlite.models.fortune import QrFortune, QrFortuneLog from src.clover_sqlite.models.fortune import QrFortune
from src.clover_sqlite.models.tarot import MajorArcana from src.clover_sqlite.models.tarot import MajorArcana
import time import time

View file

@ -13,7 +13,7 @@ async def handle(message: MessageEvent):
filename = str(message.get_user_id()) + str(random.randint(0, 10000)) + ".jpg" filename = str(message.get_user_id()) + str(random.randint(0, 10000)) + ".jpg"
value = message.get_plaintext().split(" ") value = message.get_plaintext().split(" ")
keyword, content = value[0], value[1] keyword, content = value[0], value[1]
if len(value) < 2 or len(value) > 2: if len(value) < 2 or len(value) > 2 or value[1] == "":
await luxun.finish("你让鲁迅说点啥?格式不对自己捋一捋吧~") await luxun.finish("你让鲁迅说点啥?格式不对自己捋一捋吧~")
if len(content) >= 24: if len(content) >= 24:
await luxun.finish("太长了, 鲁迅说不完! 24字以内~") await luxun.finish("太长了, 鲁迅说不完! 24字以内~")