diff --git a/plugins/jrcd.py b/plugins/jrcd.py index ee82e7f..d4df757 100644 --- a/plugins/jrcd.py +++ b/plugins/jrcd.py @@ -3,6 +3,7 @@ 提供 /jrcd 和 /bbcd 指令,用于娱乐。 """ + import random from datetime import datetime @@ -100,8 +101,13 @@ async def handle_bbcd(bot: Bot, event: MessageEvent, args: list[str]): print(message) if len(message) < 2: return + user_id1 = event.user_id - user_id2 = int(message[1].data.get("qq", 0)) + try: + user_id2 = int(message[1].data.get("qq", 0)) + except Exception: + return + if user_id1 == user_id2: await event.reply("不能和自己比!") return