Skip to content

Commit

Permalink
更改qq频道元素顺序:文字在图片前
Browse files Browse the repository at this point in the history
  • Loading branch information
super1207 committed Mar 20, 2024
1 parent f75469b commit 9502be0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/botconn/qqguild_private.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ async fn conv_event(self_t:&SelfData,root:serde_json::Value) -> Result<(), Box<d
let avatar = read_json_str(&user, "avatar");
let nickname = read_json_str(&user, "username");
let cq_msg_t = qq_content_to_cqstr(&self_t.bot_id,&self_id,&content)?;
let cq_msg = deal_attachments(&d)? + &cq_msg_t;
let cq_msg = cq_msg_t + &deal_attachments(&d)?;
let cq_msg = deal_message_reference(d,&self_t.id_event_map)? + &cq_msg;
let channel_id =read_json_str(&d, "channel_id");
let guild_id = read_json_str(&d, "guild_id");
Expand Down Expand Up @@ -123,7 +123,7 @@ async fn conv_event(self_t:&SelfData,root:serde_json::Value) -> Result<(), Box<d
let avatar = read_json_str(&user, "avatar");
let nickname = read_json_str(&user, "username");
let cq_msg_t = qq_content_to_cqstr(&self_t.bot_id,&self_id,&content)?;
let cq_msg = deal_attachments(&d)? + &cq_msg_t;
let cq_msg = cq_msg_t + &deal_attachments(&d)?;
let cq_msg = deal_message_reference(&d,&self_t.id_event_map)? + &cq_msg;
let event_json = serde_json::json!({
"time":tm,
Expand Down
6 changes: 3 additions & 3 deletions src/botconn/qqguild_public.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ async fn conv_event(self_t:&SelfData,root:serde_json::Value) -> Result<(), Box<d
let avatar = read_json_str(&user, "avatar");
let nickname = read_json_str(&user, "username");
let cq_msg_t = qq_content_to_cqstr(&self_t.bot_id,&self_id,&content)?;
let cq_msg = deal_attachments(&d)? + &cq_msg_t;
let cq_msg = cq_msg_t + &deal_attachments(&d)?;
let mut cq_msg = deal_message_reference(d,&self_t.id_event_map)? + &cq_msg;
let pre1 = format!("[CQ:at,qq={self_id}] /");
let pre2 = format!("[CQ:at,qq={self_id}] ");
Expand Down Expand Up @@ -126,7 +126,7 @@ async fn conv_event(self_t:&SelfData,root:serde_json::Value) -> Result<(), Box<d
let user = read_json_obj_or_null(&d, "author");
let user_id = read_json_str(&user, "id");
let cq_msg_t = qq_content_to_cqstr(&self_t.bot_id,&self_id,&content)?;
let cq_msg = deal_attachments(&d)? + &cq_msg_t;
let cq_msg = cq_msg_t + &deal_attachments(&d)?;
let mut cq_msg = deal_message_reference(&d,&self_t.id_event_map)? + &cq_msg;
// 去除开头的空格和/
if cq_msg.starts_with(" /"){
Expand Down Expand Up @@ -176,7 +176,7 @@ async fn conv_event(self_t:&SelfData,root:serde_json::Value) -> Result<(), Box<d
let avatar = read_json_str(&user, "avatar");
let nickname = read_json_str(&user, "username");
let cq_msg_t = qq_content_to_cqstr(&self_t.bot_id,&self_id,&content)?;
let cq_msg = deal_attachments(&d)? + &cq_msg_t;
let cq_msg = cq_msg_t + &deal_attachments(&d)?;
let cq_msg = deal_message_reference(&d,&self_t.id_event_map)? + &cq_msg;
let event_json = serde_json::json!({
"time":tm,
Expand Down

0 comments on commit 9502be0

Please sign in to comment.