feat : 群组记录存储 && .gitingore

This commit is contained in:
Wbucket
2026-09-30 22:08:14 +08:00
parent 9cb81deab4
commit 9e46704d63
3 changed files with 22 additions and 6 deletions
+5 -5
View File
@@ -1,5 +1,5 @@
from typing import Any, List
import group
from botpy.connection import ConnectionSession
from botpy.message import (Message)
@@ -127,11 +127,11 @@ class djtuWebsocket (Client) :
# 加入群聊
new_group = True
if not groups is None :
for i in groups :
for i in groups.groups :
if i.find(gid) != -1 :
new_group = False
if new_group :
groups.append(gid)
groups.groups.append(gid)
# 解析指令
commands:dict[str,types.MethodType|types.FunctionType] = {
r'吃什么' : lambda :"是啊吃什么"
@@ -160,7 +160,7 @@ class djtuWebsocket (Client) :
# 广播
try :
msg = self.q.get()
for i in groups:
for i in groups.groups:
asyncio.create_task(self.api.post_group_message(i,content=msg))
except Exception as e:
@@ -173,7 +173,7 @@ bbyAccount = os.getenv("BOBBY_ACCOUNT")
bbyPasswd = os.getenv("BOBBY_PASSWORD")
appid = os.getenv("APP_ID")
secret_bot = os.getenv("SECRET")
groups:list[str] = []
groups = group.GroupCtl()
if appid is None or secret_bot is None :
raise SystemExit("未找到bot配置!")