From b36747c728fdbbd0c57e6b472b009f8717e20ec4 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Thu, 23 Nov 2023 11:55:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DQQ=E9=A2=91=E9=81=93?= =?UTF-8?q?=E5=8F=91=E5=9B=BE=E6=96=87=E6=B6=88=E6=81=AF=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/platform/qqchan.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/model/platform/qqchan.py b/model/platform/qqchan.py index 2147d81d2..486b45b42 100644 --- a/model/platform/qqchan.py +++ b/model/platform/qqchan.py @@ -133,7 +133,7 @@ class QQChan(): try: # reply_res = asyncio.run_coroutine_threadsafe(message.raw_message.reply(content=str(plain_text), message_reference = msg_ref, file_image=image_path), self.client.loop) - reply_res = asyncio.run_coroutine_threadsafe(self.client.api.post_message(channel_id=message.channel_id, + reply_res = asyncio.run_coroutine_threadsafe(self.client.api.post_message(channel_id=str(message.channel_id), content=str(plain_text), msg_id=message.message_id, file_image=image_path, @@ -146,7 +146,7 @@ class QQChan(): split_res.append(plain_text[:len(plain_text)//2]) split_res.append(plain_text[len(plain_text)//2:]) for i in split_res: - reply_res = asyncio.run_coroutine_threadsafe(self.client.api.post_message(channel_id=message.channel_id, + reply_res = asyncio.run_coroutine_threadsafe(self.client.api.post_message(channel_id=str(message.channel_id), content=str(i), msg_id=message.message_id, file_image=image_path, @@ -157,7 +157,7 @@ class QQChan(): try: # 防止被qq频道过滤消息 plain_text = plain_text.replace(".", " . ") - reply_res = asyncio.run_coroutine_threadsafe(self.client.api.post_message(channel_id=message.channel_id, + reply_res = asyncio.run_coroutine_threadsafe(self.client.api.post_message(channel_id=str(message.channel_id), content=str(plain_text), msg_id=message.message_id, file_image=image_path, @@ -166,7 +166,7 @@ class QQChan(): print("QQ频道API错误: \n"+str(e)) try: # reply_res = asyncio.run_coroutine_threadsafe(message.raw_message.reply(content=str(str.join(" ", plain_text)), message_reference = msg_ref, file_image=image_path), self.client.loop) - reply_res = asyncio.run_coroutine_threadsafe(self.client.api.post_message(channel_id=message.channel_id, + reply_res = asyncio.run_coroutine_threadsafe(self.client.api.post_message(channel_id=str(message.channel_id), content=str(str.join(" ", plain_text)), msg_id=message.message_id, file_image=image_path, @@ -174,7 +174,7 @@ class QQChan(): except BaseException as e: plain_text = re.sub(r'(https|http)?:\/\/(\w|\.|\/|\?|\=|\&|\%)*\b', '[被隐藏的链接]', str(e), flags=re.MULTILINE) plain_text = plain_text.replace(".", "·") - reply_res = asyncio.run_coroutine_threadsafe(self.client.api.post_message(channel_id=message.channel_id, + reply_res = asyncio.run_coroutine_threadsafe(self.client.api.post_message(channel_id=str(message.channel_id), content=plain_text, msg_id=message.message_id, file_image=image_path,