Merge branch 'main' into dev

This commit is contained in:
linyuchen 2024-07-20 17:08:59 +08:00
commit 808424d08e
3 changed files with 11 additions and 3 deletions

View File

@ -1,10 +1,10 @@
{ {
"manifest_version": 4, "manifest_version": 4,
"type": "extension", "type": "extension",
"name": "LLOneBot v3.27.2", "name": "LLOneBot v3.27.3",
"slug": "LLOneBot", "slug": "LLOneBot",
"description": "使你的NTQQ支持OneBot11协议进行QQ机器人开发", "description": "使你的NTQQ支持OneBot11协议进行QQ机器人开发",
"version": "3.27.2", "version": "3.27.3",
"icon": "./icon.jpg", "icon": "./icon.jpg",
"authors": [ "authors": [
{ {

View File

@ -61,6 +61,14 @@ export function encodeCQCode(data: OB11MessageData) {
let result = '[CQ:' + data.type let result = '[CQ:' + data.type
for (const name in data.data) { for (const name in data.data) {
const value = data.data[name] const value = data.data[name]
try {
// Check if the value can be converted to a string
value.toString();
} catch (error) {
// If it can't be converted, skip this name-value pair
// console.warn(`Skipping problematic name-value pair. Name: ${name}, Value: ${value}`);
continue;
}
result += `,${name}=${CQCodeEscape(value)}` result += `,${name}=${CQCodeEscape(value)}`
} }
result += ']' result += ']'

View File

@ -1 +1 @@
export const version = '3.27.2' export const version = '3.27.3'