From b2275be532b858f75d4ccd6030145e015c0fa8b4 Mon Sep 17 00:00:00 2001 From: HenryXiaoYang Date: Fri, 22 Nov 2024 01:48:56 +0800 Subject: [PATCH 01/12] =?UTF-8?q?feat:=20=E4=B8=BA=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E5=8A=A0=E5=85=A5=E4=BA=86=E5=8F=91=E9=80=81?= =?UTF-8?q?=E6=8B=8D=E4=B8=80=E6=8B=8D=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/command/bot_status.py | 1 + plugins/command/dalle3.py | 1 + plugins/command/lucky_draw.py | 1 + plugins/command/points_trade.py | 1 + plugins/command/random_picture.py | 1 + plugins/command/red_packet.py | 1 + 6 files changed, 6 insertions(+) diff --git a/plugins/command/bot_status.py b/plugins/command/bot_status.py index 1e002ba..e8bf35f 100644 --- a/plugins/command/bot_status.py +++ b/plugins/command/bot_status.py @@ -98,3 +98,4 @@ async def run(self, bot: client.Wcf, recv: XYBotWxMsg): out_message = f"-----XYBot-----\n{self.status_message}\nBot version: {self.bot_version}\n{base64.b64decode(a).decode('utf-8')}" logger.info(f'[发送信息]{out_message}| [发送到] {recv.roomid}') bot.send_text(out_message, recv.roomid) # 发送 + bot.send_pat_msg(recv.roomid, recv.sender) # 发送拍一拍消息 diff --git a/plugins/command/dalle3.py b/plugins/command/dalle3.py index d38d602..87ecec5 100644 --- a/plugins/command/dalle3.py +++ b/plugins/command/dalle3.py @@ -83,6 +83,7 @@ async def run(self, bot: client.Wcf, recv: XYBotWxMsg): if user_wxid not in self.admins and self.db.get_whitelist(user_wxid) == 0: # 如果用户不是管理员或者白名单,扣积分 self.db.add_points(user_wxid, -self.price) await self.send_friend_or_group(bot, recv, f"-----XYBot-----\n🎉图片生成完毕,已扣除 {self.price} 点积分!🙏") + bot.send_pat_msg(recv.roomid, user_wxid) # 拍一拍 bot.send_image(image_path, recv.roomid) logger.info(f'[发送图片]{image_path}| [发送到] {recv.roomid}') diff --git a/plugins/command/lucky_draw.py b/plugins/command/lucky_draw.py index 7e7a753..b0f9fdd 100644 --- a/plugins/command/lucky_draw.py +++ b/plugins/command/lucky_draw.py @@ -140,6 +140,7 @@ async def run(self, bot: client.Wcf, recv: XYBotWxMsg): ) # 组建信息 await self.send_friend_or_group(bot, recv, message) # 发送 + bot.send_pat_msg(recv.roomid, target_wxid) # 发送拍一拍消息 else: await self.send_friend_or_group(bot, recv, error) # 发送错误 diff --git a/plugins/command/points_trade.py b/plugins/command/points_trade.py index 2b125e9..b74c399 100644 --- a/plugins/command/points_trade.py +++ b/plugins/command/points_trade.py @@ -45,6 +45,7 @@ async def run(self, bot: client.Wcf, recv: XYBotWxMsg): self.db.safe_trade_points(trader_wxid, target_wxid, points_num) # 记录日志和发送成功信息 await self.log_and_send_success_message(bot, roomid, trader_wxid, target_wxid, points_num) + bot.send_pat_msg(roomid, target_wxid) else: await self.log_and_send_error_message(bot, roomid, trader_wxid, error_message) # 记录日志和发送错误信息 else: diff --git a/plugins/command/random_picture.py b/plugins/command/random_picture.py index deef422..8a1f1b3 100644 --- a/plugins/command/random_picture.py +++ b/plugins/command/random_picture.py @@ -43,6 +43,7 @@ async def run(self, bot: client.Wcf, recv: XYBotWxMsg): logger.info(f'[发送信息](随机图图图片) {cache_path}| [发送到] {recv.roomid}') bot.send_image(os.path.abspath(cache_path), recv.roomid) # 发送图片 + bot.send_pat_msg(recv.roomid, recv.sender) # 发送拍一拍消息 except Exception as error: out_message = f"-----XYBot-----\n出现错误❌!{error}" diff --git a/plugins/command/red_packet.py b/plugins/command/red_packet.py index a546ae1..8c828a5 100644 --- a/plugins/command/red_packet.py +++ b/plugins/command/red_packet.py @@ -156,6 +156,7 @@ async def grab_red_packet(self, bot: client.Wcf, recv: XYBotWxMsg): # 组建信息 out_message = f"-----XYBot-----\n🧧恭喜 {red_packet_grabber_nick} 抢到了 {grabbed_points} 点积分!" await self.send_friend_or_group(bot, recv, out_message) + bot.send_pat_msg(recv.roomid, red_packet_grabber) # 发送拍一拍消息 # 判断是否抢完 if not self.red_packets[req_captcha]["list"]: From e617b2c81964d72205d0c9f16651b2ed19077ead Mon Sep 17 00:00:00 2001 From: HenryXiaoYang Date: Fri, 22 Nov 2024 01:49:34 +0800 Subject: [PATCH 02/12] =?UTF-8?q?feat:=20=E7=A7=BB=E9=99=A4=E4=BA=86random?= =?UTF-8?q?=5Fpicture=5Flink=E6=8F=92=E4=BB=B6=EF=BC=8C=E5=9B=A0=E4=B8=BA?= =?UTF-8?q?=E6=B2=A1=E5=95=A5=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/command/random_picture_link.py | 46 ------------------------- plugins/command/random_picture_link.yml | 6 ---- 2 files changed, 52 deletions(-) delete mode 100644 plugins/command/random_picture_link.py delete mode 100644 plugins/command/random_picture_link.yml diff --git a/plugins/command/random_picture_link.py b/plugins/command/random_picture_link.py deleted file mode 100644 index e9d9c53..0000000 --- a/plugins/command/random_picture_link.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (c) 2024. Henry Yang -# -# This program is licensed under the GNU General Public License v3.0. - -import re - -import aiohttp -import yaml -from loguru import logger -from wcferry import client - -from utils.plugin_interface import PluginInterface -from wcferry_helper import XYBotWxMsg - - -class random_picture_link(PluginInterface): - def __init__(self): - config_path = "plugins/command/random_picture_link.yml" - with open(config_path, "r", encoding="utf-8") as f: # 读取设置 - config = yaml.safe_load(f.read()) - - self.random_pic_link_url = config["random_pic_link_url"] # 随机图片api url - self.link_count = config["link_count"] # 链接数量 - - async def run(self, bot: client.Wcf, recv: XYBotWxMsg): - recv.content = re.split(" |\u2005", recv.content) # 拆分消息 - - try: - out_message = "-----XYBot-----\n❓❓❓\n" - - conn_ssl = aiohttp.TCPConnector(verify_ssl=False) - for _ in range(self.link_count): - async with aiohttp.request( - "GET", url=self.random_pic_link_url, connector=conn_ssl - ) as req: - out_message += f"❓: {req.url}\n" - await conn_ssl.close() - - logger.info(f'[发送信息]{out_message}| [发送到] {recv.roomid}') # 发送信息 - bot.send_text(out_message, recv.roomid) # 发送 - - except Exception as error: - out_message = f"-----XYBot-----\n出现错误❌!{error}" - logger.error(error) - logger.info(f'[发送信息]{out_message}| [发送到] {recv.roomid}') - bot.send_text(out_message, recv.roomid) diff --git a/plugins/command/random_picture_link.yml b/plugins/command/random_picture_link.yml deleted file mode 100644 index fcd3677..0000000 --- a/plugins/command/random_picture_link.yml +++ /dev/null @@ -1,6 +0,0 @@ -keywords: [ "随机链接" ] -plugin_name: "random_picture_link" - -random_pic_link_url: "https://api.yimian.xyz/img?type=moe" - -link_count: 3 \ No newline at end of file From 174090da7fbe2f52b5347b8ef3c326a469eb6d1f Mon Sep 17 00:00:00 2001 From: HenryXiaoYang Date: Fri, 22 Nov 2024 03:29:05 +0800 Subject: [PATCH 03/12] =?UTF-8?q?feat:=20=E5=8A=A0=E5=85=A5=E4=BA=86mentio?= =?UTF-8?q?n=5Fgpt=E6=8F=92=E4=BB=B6=EF=BC=8C=E5=9C=A8=E7=BE=A4=E4=B8=AD@?= =?UTF-8?q?=E6=9C=BA=E5=99=A8=E4=BA=BA=E5=8D=B3=E5=8F=AF=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E5=88=B0gpt=EF=BC=8Cgpt=E5=8F=AF=E4=BB=A5=E8=B0=83=E7=94=A8AI?= =?UTF-8?q?=E7=94=BB=E5=9B=BE=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/mention/mention_gpt.py | 213 ++++++++++++++++++++++++++++++++ plugins/mention/mention_gpt.yml | 15 +++ 2 files changed, 228 insertions(+) create mode 100644 plugins/mention/mention_gpt.py create mode 100644 plugins/mention/mention_gpt.yml diff --git a/plugins/mention/mention_gpt.py b/plugins/mention/mention_gpt.py new file mode 100644 index 0000000..a99ad0a --- /dev/null +++ b/plugins/mention/mention_gpt.py @@ -0,0 +1,213 @@ +# Copyright (c) 2024. Henry Yang +# +# This program is licensed under the GNU General Public License v3.0. + +import base64 +import json +import os +import time + +import yaml +from loguru import logger +from openai import AsyncOpenAI +from wcferry import client + +from utils.database import BotDatabase +from utils.plugin_interface import PluginInterface +from wcferry_helper import XYBotWxMsg + + +class mention_gpt(PluginInterface): + def __init__(self): + config_path = "plugins/mention/mention_gpt.yml" + with open(config_path, "r", encoding="utf-8") as f: # 读取设置 + config = yaml.safe_load(f.read()) + + self.gpt_version = config["gpt_version"] # gpt版本 + self.gpt_point_price = config["gpt_point_price"] # gpt使用价格(单次) + self.gpt_max_token = config["gpt_max_token"] # gpt 最大token + self.gpt_temperature = config["gpt_temperature"] # gpt 温度 + + self.model_name = config["model_name"] # 模型名称 + self.image_quality = config["image_quality"] # 图片质量 + self.image_size = config["image_size"] # 图片尺寸 + self.image_price = config["image_price"] # 图片价格 + + self.max_possible_points = self.gpt_point_price * 2 + self.image_price # 消耗积分极限 + + main_config_path = "main_config.yml" + with open(main_config_path, "r", encoding="utf-8") as f: # 读取设置 + main_config = yaml.safe_load(f.read()) + + self.admins = main_config["admins"] # 获取管理员列表 + + self.openai_api_base = main_config["openai_api_base"] # openai api 链接 + self.openai_api_key = main_config["openai_api_key"] # openai api 密钥 + + sensitive_words_path = "sensitive_words.yml" # 加载敏感词yml + with open(sensitive_words_path, "r", encoding="utf-8") as f: # 读取设置 + sensitive_words_config = yaml.safe_load(f.read()) + self.sensitive_words = sensitive_words_config["sensitive_words"] # 敏感词列表 + + self.db = BotDatabase() + + async def run(self, bot: client.Wcf, recv: XYBotWxMsg): + user_wxid = recv.sender + gpt_request_message = recv.content + + error = "" + if self.db.get_points( + user_wxid) < self.max_possible_points and user_wxid not in self.admins and not self.db.get_whitelist( + user_wxid): # 积分不够 + error = f"本功能可消耗最多 {self.max_possible_points} 点积分,您的积分不足,无法使用GPT功能!⚠️" + elif not self.senstitive_word_check(gpt_request_message): # 有敏感词 + error = "您的问题中包含敏感词,请重新输入!⚠️" + + if error: + await self.send_friend_or_group(bot, recv, error) + return + + chat_completion = await self.chatgpt(gpt_request_message) + + if not chat_completion[0]: + out_message = f"出现错误,请稍后再试!⚠️\n错误信息:\n{str(chat_completion[1])}" + await self.send_friend_or_group(bot, recv, out_message) + + chat_completion = chat_completion[1] + if chat_completion.choices[0].message.tool_calls: + tool_call = chat_completion.choices[0].message.tool_calls[0] + prompt = json.loads(tool_call.function.arguments).get("prompt") + + sucess = await self.generate_and_send_picture(prompt, bot, recv) + + chat_completion_2 = await self.function_call_result_to_gpt(gpt_request_message, prompt, sucess, + chat_completion) + await self.send_friend_or_group(bot, recv, chat_completion_2.choices[0].message.content) + + if user_wxid not in self.admins and not self.db.get_whitelist(user_wxid): + minus_points = self.gpt_point_price * 2 + self.image_price + self.db.add_points(user_wxid, minus_points * -1) + + else: + await self.send_friend_or_group(bot, recv, chat_completion.choices[0].message.content) + if user_wxid not in self.admins and not self.db.get_whitelist(user_wxid): + self.db.add_points(user_wxid, self.gpt_point_price * -1) + + async def chatgpt(self, gpt_request_message): + client = AsyncOpenAI(api_key=self.openai_api_key, base_url=self.openai_api_base) + try: + tools = [ + { + "type": "function", + "function": { + "name": "generate_and_send_picture", + "description": "Generate an image using the user's description. Call this when the user requests an image, for example when a user asks 'Can you show me a picture of a cat?'. The function returns true on sucess.", + "parameters": { + "type": "object", + "properties": { + "prompt": { + "type": "string", + "description": "The prompt of the image to generate." + }, + + }, + "required": ["prompt"], + "additionalProperties": False + } + } + } + ] + chat_completion = await client.chat.completions.create( + messages=[ + { + "role": "system", + "content": "You are a helpful, creative, clever, and very friendly assistant. You output in plain text instead of markdown. You may also generate images.", + }, + { + "role": "user", + "content": gpt_request_message, + } + ], + tools=tools, + model=self.gpt_version, + temperature=self.gpt_temperature, + max_tokens=self.gpt_max_token, + ) + return True, chat_completion + except Exception as error: + return False, error + + async def function_call_result_to_gpt(self, gpt_request_message, prompt, success, chat_completion): + function_call_result_message = { + "role": "tool", + "content": json.dumps({ + "prompt": prompt, + "success": success, + }), + "tool_call_id": chat_completion.choices[0].message.tool_calls[0].id + } + + client = AsyncOpenAI(api_key=self.openai_api_key, base_url=self.openai_api_base) + response_chat_completion = await client.chat.completions.create( + messages=[ + { + "role": "system", + "content": "You are a helpful, creative, clever, and very friendly assistant. You output in plain text instead of markdown. You may also generate images.", + }, + { + "role": "user", + "content": gpt_request_message, + }, + chat_completion.choices[0].message, + function_call_result_message + ], + model=self.gpt_version, + temperature=self.gpt_temperature, + max_tokens=self.gpt_max_token, + ) + return response_chat_completion + + async def generate_and_send_picture(self, prompt: str, bot: client.Wcf, recv: XYBotWxMsg) -> bool: + try: + save_path = await self.dalle3(prompt) + bot.send_image(save_path, recv.roomid) + return True + except Exception as error: + logger.error(f"Error: {error}") + return False + + async def dalle3(self, prompt): # 返回生成的图片的绝对路径,报错的话返回错误 + client = AsyncOpenAI(api_key=self.openai_api_key, base_url=self.openai_api_base) + try: + image_generation = await client.images.generate( + prompt=prompt, + model=self.model_name, + n=1, + response_format="b64_json", + quality=self.image_quality, + size=self.image_size) + + image_b64decode = base64.b64decode(image_generation.data[0].b64_json) + save_path = os.path.abspath(f"resources/cache/dalle3_{time.time_ns()}.png") + with open(save_path, "wb") as f: + f.write(image_b64decode) + except Exception as e: + return e + + return save_path + + def senstitive_word_check(self, message): # 检查敏感词 + for word in self.sensitive_words: + if word in message: + return False + return True + + async def send_friend_or_group(self, bot: client.Wcf, recv: XYBotWxMsg, out_message="null"): + if recv.from_group(): # 判断是群还是私聊 + out_message = f"@{self.db.get_nickname(recv.sender)}\n{out_message}" + logger.info(f'[发送@信息]{out_message}| [发送到] {recv.roomid}') + bot.send_text(out_message, recv.roomid, recv.sender) # 发送@信息 + + else: + logger.info(f'[发送信息]{out_message}| [发送到] {recv.roomid}') + bot.send_text(out_message, recv.roomid) # 发送 diff --git a/plugins/mention/mention_gpt.yml b/plugins/mention/mention_gpt.yml new file mode 100644 index 0000000..d0e4ef8 --- /dev/null +++ b/plugins/mention/mention_gpt.yml @@ -0,0 +1,15 @@ +gpt_point_price: 3 + +# 调用函数需要特定的版本 https://platform.openai.com/docs/guides/function-calling#which-models-support-function-calling +gpt_version: 'gpt-4o-mini' +gpt_max_token: 1000 +gpt_temperature: 0.5 + +# 每次生成图片消耗的积分 +image_price: 5 + +# https://platform.openai.com/docs/api-reference/images/create +model_name: "dall-e-3" # 模型名 +image_quality: "standard" # 生成质量,更好的质量可设置为"hd" +image_size: "1024x1024" # 图片大小 +image_style: "vivid" # 图片风格 \ No newline at end of file From b448a5c7ac6cd8800cce55587f80e1d637921feb Mon Sep 17 00:00:00 2001 From: HenryXiaoYang Date: Fri, 22 Nov 2024 16:16:04 +0800 Subject: [PATCH 04/12] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BA=86chatgpt?= =?UTF-8?q?=E5=B0=9D=E8=AF=95=E7=94=9F=E6=88=90=E5=A4=9A=E4=B8=AA=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E5=AF=BC=E8=87=B4=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/mention/mention_gpt.py | 47 +++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/plugins/mention/mention_gpt.py b/plugins/mention/mention_gpt.py index a99ad0a..37f26cc 100644 --- a/plugins/mention/mention_gpt.py +++ b/plugins/mention/mention_gpt.py @@ -78,10 +78,18 @@ async def run(self, bot: client.Wcf, recv: XYBotWxMsg): tool_call = chat_completion.choices[0].message.tool_calls[0] prompt = json.loads(tool_call.function.arguments).get("prompt") - sucess = await self.generate_and_send_picture(prompt, bot, recv) - - chat_completion_2 = await self.function_call_result_to_gpt(gpt_request_message, prompt, sucess, - chat_completion) + success = await self.generate_and_send_picture(prompt, bot, recv) + + function_call_result_message = { + "role": "tool", + "content": json.dumps({ + "prompt": prompt, + "success": success, + }), + "tool_call_id": tool_call.id + } + + chat_completion_2 = await self.function_call_result_to_gpt(gpt_request_message, chat_completion, function_call_result_message) await self.send_friend_or_group(bot, recv, chat_completion_2.choices[0].message.content) if user_wxid not in self.admins and not self.db.get_whitelist(user_wxid): @@ -112,7 +120,7 @@ async def chatgpt(self, gpt_request_message): }, "required": ["prompt"], - "additionalProperties": False + "additionalProperties": False, } } } @@ -121,7 +129,7 @@ async def chatgpt(self, gpt_request_message): messages=[ { "role": "system", - "content": "You are a helpful, creative, clever, and very friendly assistant. You output in plain text instead of markdown. You may also generate images.", + "content": "You are a helpful, creative, clever, and very friendly assistant. You output in plain text instead of markdown.", }, { "role": "user", @@ -132,35 +140,28 @@ async def chatgpt(self, gpt_request_message): model=self.gpt_version, temperature=self.gpt_temperature, max_tokens=self.gpt_max_token, + parallel_tool_calls=False ) return True, chat_completion except Exception as error: return False, error - async def function_call_result_to_gpt(self, gpt_request_message, prompt, success, chat_completion): - function_call_result_message = { - "role": "tool", - "content": json.dumps({ - "prompt": prompt, - "success": success, - }), - "tool_call_id": chat_completion.choices[0].message.tool_calls[0].id - } - + async def function_call_result_to_gpt(self, gpt_request_message, chat_completion, function_call_result_message): client = AsyncOpenAI(api_key=self.openai_api_key, base_url=self.openai_api_base) - response_chat_completion = await client.chat.completions.create( - messages=[ + message_payload = [ { "role": "system", - "content": "You are a helpful, creative, clever, and very friendly assistant. You output in plain text instead of markdown. You may also generate images.", + "content": "You are a helpful, creative, clever, and very friendly assistant. You output in plain text instead of markdown.", }, { "role": "user", "content": gpt_request_message, }, - chat_completion.choices[0].message, + chat_completion.choices[0].message.dict(), function_call_result_message - ], + ] + response_chat_completion = await client.chat.completions.create( + messages=message_payload, model=self.gpt_version, temperature=self.gpt_temperature, max_tokens=self.gpt_max_token, @@ -169,14 +170,17 @@ async def function_call_result_to_gpt(self, gpt_request_message, prompt, success async def generate_and_send_picture(self, prompt: str, bot: client.Wcf, recv: XYBotWxMsg) -> bool: try: + await self.send_friend_or_group(bot, recv, f"⚙️生成图片中...") save_path = await self.dalle3(prompt) bot.send_image(save_path, recv.roomid) + logger.info(f"发送图片: {save_path}") return True except Exception as error: logger.error(f"Error: {error}") return False async def dalle3(self, prompt): # 返回生成的图片的绝对路径,报错的话返回错误 + logger.info(f"开始生成图片: {prompt}") client = AsyncOpenAI(api_key=self.openai_api_key, base_url=self.openai_api_base) try: image_generation = await client.images.generate( @@ -194,6 +198,7 @@ async def dalle3(self, prompt): # 返回生成的图片的绝对路径,报错 except Exception as e: return e + logger.info(f"生成图片 {prompt} 成功: {save_path}") return save_path def senstitive_word_check(self, message): # 检查敏感词 From 25419073a46b51a04ec0aa724556c134c9a259bb Mon Sep 17 00:00:00 2001 From: emuio Date: Sun, 24 Nov 2024 12:47:56 +0800 Subject: [PATCH 05/12] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=91=98=E4=B8=8D=E5=9C=A8=E7=99=BD=E5=90=8D=E5=8D=95?= =?UTF-8?q?=E9=87=8C=E6=97=B6=E4=BC=9A=E8=A2=AB=E6=89=A3=E7=A7=AF=E5=88=86?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/text/private_chatgpt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/text/private_chatgpt.py b/plugins/text/private_chatgpt.py index 948fa0e..9f5bb63 100644 --- a/plugins/text/private_chatgpt.py +++ b/plugins/text/private_chatgpt.py @@ -79,7 +79,7 @@ async def run(self, bot: client.Wcf, recv: XYBotWxMsg): if gpt_answer[0]: # 如果没有错误 bot.send_text(gpt_answer[1], wxid) # 发送回答 logger.info(f'[发送信息]{gpt_answer[1]}| [发送到] {wxid}') - if wxid not in self.admins or not self.db.get_whitelist(wxid): + if wxid not in self.admins and not self.db.get_whitelist(wxid): self.db.add_points(wxid, -self.private_chat_gpt_price) # 扣除积分,管理员不扣 else: out_message = f"出现错误⚠️!\n{gpt_answer[1]}" # 如果有错误,发送错误信息 From a1660106c6585c8d5771949aaf5a4534cee97f84 Mon Sep 17 00:00:00 2001 From: HenryXiaoYang Date: Mon, 25 Nov 2024 12:03:17 +0800 Subject: [PATCH 06/12] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/command/sign_in.py | 3 +++ plugins/mention/mention_gpt.py | 1 + 2 files changed, 4 insertions(+) diff --git a/plugins/command/sign_in.py b/plugins/command/sign_in.py index f8105bb..840ab4c 100644 --- a/plugins/command/sign_in.py +++ b/plugins/command/sign_in.py @@ -68,6 +68,9 @@ async def run(self, bot: client.Wcf, recv: XYBotWxMsg): logger.info(f"[发送@信息]{out_message}| [发送到] {recv.roomid}") bot.send_text(out_message, recv.roomid, sign_wxid) + bot.send_pat_msg(recv.roomid, sign_wxid) + logger.info(f"[发送拍一拍] 拍了拍: {sign_wxid} | 发送到: {recv.roomid}") + def signstat_check(self, signstat): # 检查签到状态 signstat = "20000101" if signstat in ["0", "1"] else signstat last_sign_date = datetime.strptime(signstat, "%Y%m%d").date() diff --git a/plugins/mention/mention_gpt.py b/plugins/mention/mention_gpt.py index 37f26cc..3a7ca5f 100644 --- a/plugins/mention/mention_gpt.py +++ b/plugins/mention/mention_gpt.py @@ -70,6 +70,7 @@ async def run(self, bot: client.Wcf, recv: XYBotWxMsg): chat_completion = await self.chatgpt(gpt_request_message) if not chat_completion[0]: + logger.error(str(chat_completion[1])) out_message = f"出现错误,请稍后再试!⚠️\n错误信息:\n{str(chat_completion[1])}" await self.send_friend_or_group(bot, recv, out_message) From 1f29f77eed31d76168ce19f7036d71d64d2a9304 Mon Sep 17 00:00:00 2001 From: HenryXiaoYang Date: Tue, 26 Nov 2024 16:33:55 +0800 Subject: [PATCH 07/12] fix: library security fix --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index dd13b02..0c1fbcb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,9 +3,9 @@ PyYAML~=6.0.1 loguru~=0.7.2 wcferry~=39.2.4.0 pytz~=2024.1 -requests~=2.31.0 +requests~=2.32.0 openai~=1.35.14 -aiohttp~=3.9.5 +aiohttp~=3.10.11 beautifulsoup4~=4.12.3 pillow~=10.3.0 captcha~=0.5.0 From 0f3a3f2b2bc56c03547e9f64fb36e4c6019d8b21 Mon Sep 17 00:00:00 2001 From: emuio Date: Fri, 29 Nov 2024 10:10:42 +0800 Subject: [PATCH 08/12] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=8A=A2=E7=BA=A2=E5=8C=85=E9=97=AE=E9=A2=98.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/command/red_packet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/command/red_packet.py b/plugins/command/red_packet.py index 8c828a5..ab9321a 100644 --- a/plugins/command/red_packet.py +++ b/plugins/command/red_packet.py @@ -135,7 +135,7 @@ async def grab_red_packet(self, bot: client.Wcf, recv: XYBotWxMsg): error = "-----XYBot-----\n❌红包只能在群里抢!" elif red_packet_grabber in self.red_packets[req_captcha]["grabbed"]: error = "-----XYBot-----\n⚠️你已经抢过这个红包了!" - elif self.red_packets[req_captcha].sender == red_packet_grabber: + elif self.red_packets[req_captcha]["sender"] == red_packet_grabber: error = "-----XYBot-----\n❌不能抢自己的红包!" if not error: From a1cd427328102647db6ad3a46dde78b819a4fbf9 Mon Sep 17 00:00:00 2001 From: HenryXiaoYang Date: Sat, 7 Dec 2024 20:46:18 +0800 Subject: [PATCH 09/12] =?UTF-8?q?feat:=20join=5Fnotification.py=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=E6=AC=A2=E8=BF=8E=E6=96=B0=E6=88=90?= =?UTF-8?q?=E5=91=98=E7=9A=84=E5=8A=9F=E8=83=BD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/join_group/join_notification.py | 34 +++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 plugins/join_group/join_notification.py diff --git a/plugins/join_group/join_notification.py b/plugins/join_group/join_notification.py new file mode 100644 index 0000000..901c47c --- /dev/null +++ b/plugins/join_group/join_notification.py @@ -0,0 +1,34 @@ +# Copyright (c) 2024. Henry Yang +# +# This program is licensed under the GNU General Public License v3.0. +import os +import re + +from loguru import logger +from wcferry import client + +from utils.plugin_interface import PluginInterface +from wcferry_helper import XYBotWxMsg + + +class join_notification(PluginInterface): + def __init__(self): + self.logo_path = os.path.abspath("resources/XYBotLogo.png") + + async def run(self, bot: client.Wcf, recv: XYBotWxMsg): + join_group_msg = recv.content + + # 邀请进来的 + if "邀请" in join_group_msg: + # 通过正则表达式提取邀请者的名字 + invite_pattern = r'"([^"]+)"邀请"([^"]+)"加入了群聊' + match = re.search(invite_pattern, join_group_msg) + + if match: + joiner = match.group(2) + await self.send_welcome(bot, recv.roomid, joiner) + + async def send_welcome(self, bot: client.Wcf, roomid: str, joiner: str): + out_message = f"-------- XYBot ---------\n👏欢迎新成员 {joiner} 加入本群!⭐️\n⚙️输入 菜单 获取玩法哦😄" + logger.info(f'[发送信息]{out_message}| [发送到] {roomid}') + bot.send_text(out_message, roomid) From b864ef7860e84e35505f8487a02023564e7a0256 Mon Sep 17 00:00:00 2001 From: HenryXiaoYang Date: Sat, 7 Dec 2024 21:19:47 +0800 Subject: [PATCH 10/12] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0XYBot=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E6=9C=BA=E5=99=A8=E4=BA=BAlogo=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E5=92=8C=E7=89=88=E6=9C=AC=E5=8F=B7=EF=BC=8C=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=92=8CXYBot=E8=AE=BE=E7=BD=AE=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/README.md | 6 +++--- docs/xybot_logo_32x32.png | Bin 4457 -> 5855 bytes ...37\350\203\275\344\273\213\347\273\215.md" | 2 ++ ...22\344\273\266\347\274\226\345\206\231.md" | 2 ++ ...ot\347\232\204\350\256\276\347\275\256.md" | 8 ++++---- docs/zh-cn/_coverpage.md | 2 +- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/README.md b/docs/README.md index f291c46..feaa4f3 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,7 +1,7 @@ # XYBot 微信机器人

- XYBot微信机器人logo + XYBot微信机器人logo

XYBot是一个可运行于Linux和Windows的基于Hook的微信机器人。😊 具有高度可自定义性,支持自我编写插件。🚀 @@ -21,7 +21,7 @@ XYBot详细的部署教程可以在项目的Wiki中找到。📚 同时,XYBot

GPLv3 License - Version + Version Blog

@@ -151,7 +151,7 @@ python start.py #### 用的什么微信版本?🤔️ -3.9.10.27😄 +3.9.11.25😄 #### 最长能运行多久?🤔️ diff --git a/docs/xybot_logo_32x32.png b/docs/xybot_logo_32x32.png index cd006f71945fdb56ec101d5a464091f4838499d8..90ddfaf048c3bbe6571957525137c6701ea9aeea 100644 GIT binary patch delta 5508 zcmbVPXHe5$vkpyquL?*EMUa+25+Oq9O+kuOX@(Gx8idfx4^R{fO?t0V14t7@0w^db zO^_f`q=QJW5d^*b@B6;@%e|lOnK?6O&(5>^%yV{T&#ppdWD^wuCIdGuEfYU8Jx#EI zjusN8j6}*R$iYA${l~et0*ACgTX`W zk(^u-Ny|mOq- zK|W+TF|MAuzxP{BB&JGsTR-y)JUF0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B>d)MOykESnRj<8B!u zJ5psApOZJ)b0MS1tUaUC`o=!YInk^hnA%m~oE~-x>S;YM8??&*k&Wt8Dj1%S`+IS4PY}y>I(gbqqNNy^0@9{t~d!$PcWB zTRQ#p_5m-SWWI9J3@F#;w13oP2?V!Nl{P14!xaybXzkzoDH zZmKi)_CH2NCntiDBgrNy8*ZF7a`DRpwB*H(!M8e9zx`IYL7btnVO<^c{J=fxeBHzP zwZ%RyO2c#YN!?Q&>@v{+S2O+Nu_0BHQ@sm^!6i=SF-jw9@Dn<8^xSb-nVowglcr0i zHi)4@qFxD)DVm_GEfyk$nwL651Fl_mF>9uz4mTv7>S5I08>)TyRgYTRW^7sZK&(Z? zu$x~~y=yjC@paVN8x2phPh8rj+}7J0S-r#$(Q_$3pnbIpBI?{b>RIz_t94(zK>0@3 zt?z4lo$r(sG_`EA8`~4He1PoNglyJFW{#Y?C#rhCIkCMrkB{5{$*6npxr+c+%kND**p3^$r$nQPgPS(CCyG_{HsMy9-8Q(+HJwO?F{#jywmvf)ud_sw&l+gGmKD9 zd{y^0pKkA}TjZR+>sb$XI(1+!)3!SVapn)~TcGC^mXOwEceD}=7Sl3x=rniQJMoNn z=epbjV5NZ(pJ1asjj?Rl*RBpm@W6#cLyW)oA8bxLR diff --git "a/docs/zh-cn/XYBot\345\212\237\350\203\275\344\273\213\347\273\215.md" "b/docs/zh-cn/XYBot\345\212\237\350\203\275\344\273\213\347\273\215.md" index 100b7c2..41ef7f2 100644 --- "a/docs/zh-cn/XYBot\345\212\237\350\203\275\344\273\213\347\273\215.md" +++ "b/docs/zh-cn/XYBot\345\212\237\350\203\275\344\273\213\347\273\215.md" @@ -1,3 +1,5 @@ +# 本文档已过期 + # XYBot功能介绍 这一页介绍了所有官方XYBot微信机器人用户可使用的功能、命令。 diff --git "a/docs/zh-cn/XYBot\346\217\222\344\273\266\347\274\226\345\206\231.md" "b/docs/zh-cn/XYBot\346\217\222\344\273\266\347\274\226\345\206\231.md" index c026d1c..fa1cbd0 100644 --- "a/docs/zh-cn/XYBot\346\217\222\344\273\266\347\274\226\345\206\231.md" +++ "b/docs/zh-cn/XYBot\346\217\222\344\273\266\347\274\226\345\206\231.md" @@ -1,3 +1,5 @@ +# 本文档已过期 + # XYBot插件编写 这一页讲述了如何编写一个XYBot插件 diff --git "a/docs/zh-cn/XYBot\347\232\204\350\256\276\347\275\256.md" "b/docs/zh-cn/XYBot\347\232\204\350\256\276\347\275\256.md" index 98ac68a..9abc575 100644 --- "a/docs/zh-cn/XYBot\347\232\204\350\256\276\347\275\256.md" +++ "b/docs/zh-cn/XYBot\347\232\204\350\256\276\347\275\256.md" @@ -2,15 +2,15 @@ 这一页写了如何设置XYBot。 -本篇适用于`XYBot v2.0.0`。 +本篇适用于`XYBot v2.2.0`。 ## 配置主设置 -这是`XYBot v2.0.0`的主设置: +这是`XYBot v2.2.0`的主设置: ```yaml -#Version v2.0.0 -bot_version: "v2.0.0" +#Version v2.2.0 +bot_version: "v2.2.0" # XYBot主设置 diff --git a/docs/zh-cn/_coverpage.md b/docs/zh-cn/_coverpage.md index c540934..9ef7dcc 100644 --- a/docs/zh-cn/_coverpage.md +++ b/docs/zh-cn/_coverpage.md @@ -1,4 +1,4 @@ -![logo](https://github.com/HenryXiaoYang/HXY_Readme_Images/blob/main/XYBot/v0.0.7/logo/xybot_logo_small.png?raw=true) +![logo](https://github.com/HenryXiaoYang/HXY_Readme_Images/blob/main/XYBot/logo/xybot_logo_medium.png?raw=true) # XYBot v2.0.0 From 8fa31c32c3a4d576af986aa43f30214a885f5def Mon Sep 17 00:00:00 2001 From: HenryXiaoYang Date: Sat, 7 Dec 2024 21:20:28 +0800 Subject: [PATCH 11/12] =?UTF-8?q?docs:=20=E6=B7=BB=E5=8A=A0XYBotLogo.svg?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/XYBotLogo.svg | 133 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 resources/XYBotLogo.svg diff --git a/resources/XYBotLogo.svg b/resources/XYBotLogo.svg new file mode 100644 index 0000000..5525991 --- /dev/null +++ b/resources/XYBotLogo.svg @@ -0,0 +1,133 @@ + + + + + + From 639e3867068a974a6941f29e514109ccf83cdb66 Mon Sep 17 00:00:00 2001 From: HenryXiaoYang Date: Sat, 7 Dec 2024 21:20:47 +0800 Subject: [PATCH 12/12] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E6=9C=BA?= =?UTF-8?q?=E5=99=A8=E4=BA=BA=E7=89=88=E6=9C=AC=E8=87=B3v2.2.0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main_config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main_config.yml b/main_config.yml index 1b12e33..764a6ce 100644 --- a/main_config.yml +++ b/main_config.yml @@ -1,5 +1,5 @@ -#Version v2.0.0 -bot_version: "v2.0.0" +#Version v2.2.0 +bot_version: "v2.2.0" # XYBot主设置