Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DoroWolf committed Nov 29, 2024
1 parent dbef1d8 commit 475dc78
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bots/aiocqhttp/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def generate_cq(data: Dict[str, Any]) -> Optional[str]:
if 'type' in data and 'data' in data:
cq_type = data['type']
params = data['data']
param_str = [f"{key}={CQCodeHandler.escape_special_char(value)}"
param_str = [f"{key}={CQCodeHandler.escape_special_char(str(value))}"
for key, value in params.items()]
cq_code = f"[CQ:{cq_type}," + ",".join(param_str) + "]"
return cq_code
Expand Down
2 changes: 1 addition & 1 deletion core/builtins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def __init__(self, target_from, target_id, sender_from=None, sender_id=None):
self.session = Session(message=False, target=target_id, sender=sender_id)
self.parent = Bot.MessageSession(self.target, self.session)
if sender_id:
self.parent.target.sender_info = exports.get("BotDBUtil").SenderInfo(f'{sender_from}|{sender_id}')
self.parent.target.sender_id = exports.get("BotDBUtil").SenderInfo(f'{sender_from}|{sender_id}')


Bot.FetchedSession = FetchedSession
Expand Down

0 comments on commit 475dc78

Please sign in to comment.