修复/jrcd @全体成员 命令会导致报错的BUG
This commit is contained in:
@@ -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
|
||||
try:
|
||||
user_id2 = int(message[1].data.get("qq", 0))
|
||||
except Exception:
|
||||
return
|
||||
|
||||
if user_id1 == user_id2:
|
||||
await event.reply("不能和自己比!")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user