Update main.py
Browse files
main.py
CHANGED
|
@@ -7,8 +7,8 @@ from contextlib import asynccontextmanager
|
|
| 7 |
# 在这里配置两个机器人的房间号和对应的独立账号 ID!
|
| 8 |
# 注意:第二个账号必须换成您拥有的另一个有效天凤 ID。
|
| 9 |
BOT_CONFIGS = [
|
| 10 |
-
{"
|
| 11 |
-
{"
|
| 12 |
]
|
| 13 |
# ============================================
|
| 14 |
|
|
@@ -17,12 +17,12 @@ bots = [None, None]
|
|
| 17 |
async def run_bot(index, config):
|
| 18 |
global bots
|
| 19 |
while True:
|
| 20 |
-
|
| 21 |
bot_id = config["id"]
|
| 22 |
print(f"========== 正在启动机器人 {index + 1} (房间 {room_id} | 账号 {bot_id}) ==========")
|
| 23 |
|
| 24 |
# 启动脚本,不仅传房间号,还把专属 ID 传进去
|
| 25 |
-
bots[index] = subprocess.Popen(["python", "-u", "
|
| 26 |
|
| 27 |
while bots[index].poll() is None:
|
| 28 |
await asyncio.sleep(1)
|
|
|
|
| 7 |
# 在这里配置两个机器人的房间号和对应的独立账号 ID!
|
| 8 |
# 注意:第二个账号必须换成您拥有的另一个有效天凤 ID。
|
| 9 |
BOT_CONFIGS = [
|
| 10 |
+
{"changci": "153", "id": "ID10CC3AA2-ZVHZe4Ae"},
|
| 11 |
+
{"changci": "153", "id": "ID2FA84D3D-2F36ADaG"}
|
| 12 |
]
|
| 13 |
# ============================================
|
| 14 |
|
|
|
|
| 17 |
async def run_bot(index, config):
|
| 18 |
global bots
|
| 19 |
while True:
|
| 20 |
+
changci = config["changci"]
|
| 21 |
bot_id = config["id"]
|
| 22 |
print(f"========== 正在启动机器人 {index + 1} (房间 {room_id} | 账号 {bot_id}) ==========")
|
| 23 |
|
| 24 |
# 启动脚本,不仅传房间号,还把专属 ID 传进去
|
| 25 |
+
bots[index] = subprocess.Popen(["python", "-u", "core.py", bot_id, changci])
|
| 26 |
|
| 27 |
while bots[index].poll() is None:
|
| 28 |
await asyncio.sleep(1)
|