kickzero 1.3.1__tar.gz → 1.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kickzero-1.3.2/CHANGELOG.md +14 -0
- {kickzero-1.3.1 → kickzero-1.3.2}/MANIFEST.in +6 -2
- {kickzero-1.3.1 → kickzero-1.3.2}/PKG-INFO +2 -2
- {kickzero-1.3.1 → kickzero-1.3.2}/README.md +1 -1
- {kickzero-1.3.1 → kickzero-1.3.2}/kickzero/__init__.py +22 -8
- {kickzero-1.3.1 → kickzero-1.3.2}/kickzero.egg-info/PKG-INFO +2 -2
- {kickzero-1.3.1 → kickzero-1.3.2}/kickzero.egg-info/SOURCES.txt +1 -0
- {kickzero-1.3.1 → kickzero-1.3.2}/setup.py +1 -1
- {kickzero-1.3.1 → kickzero-1.3.2}/examples/advenced_bot.py +0 -0
- {kickzero-1.3.1 → kickzero-1.3.2}/examples/basic_bot.py +0 -0
- {kickzero-1.3.1 → kickzero-1.3.2}/kickzero.egg-info/dependency_links.txt +0 -0
- {kickzero-1.3.1 → kickzero-1.3.2}/kickzero.egg-info/requires.txt +0 -0
- {kickzero-1.3.1 → kickzero-1.3.2}/kickzero.egg-info/top_level.txt +0 -0
- {kickzero-1.3.1 → kickzero-1.3.2}/setup.cfg +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# 📜 Değişim Günlüğü (Change Log)
|
|
2
|
+
|
|
3
|
+
Tüm önemli değişiklikler bu dosyada belgelenecektir.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## [1.3.2] - 2026-04-19 🏴☠️
|
|
8
|
+
|
|
9
|
+
### ⚓ Bağlantı ve Stabilite (Kritik Güncelleme)
|
|
10
|
+
- **Handshake Çözümü:** WebSocket bağlantısı sırasında yaşanan `timed out during opening handshake` hatası, `connect` fonksiyonu asenkron hale getirilerek ve `open_timeout` süresi 30 saniyeye çıkarılarak çözüldü.
|
|
11
|
+
- **Dinamik Yeniden Bağlanma:** Bağlantı koptuğunda veya zaman aşımına uğradığında botun çökmesini engelleyen `try-except` döngüsü eklendi. Bot artık 5 saniye bekleyip otomatik olarak tekrar deniyor.
|
|
12
|
+
- **Modern Asenkron Yapı:** Ana döngüdeki bağlantı yönetimi `async with await` protokolüne geçirilerek daha stabil ve sızıntısız (leak-proof) bir yapıya kavuşturuldu.
|
|
13
|
+
|
|
14
|
+
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
include LICENSE
|
|
3
3
|
include README.md
|
|
4
4
|
include MANIFEST.in
|
|
5
|
-
|
|
5
|
+
include CHANGELOG.md
|
|
6
6
|
# --- ÖRNEKLER ---
|
|
7
7
|
# Kullanıcıların botu nasıl kuracağını öğrenmesi için şart
|
|
8
8
|
recursive-include examples *.py
|
|
@@ -33,4 +33,8 @@ recursive-exclude * *$py.class
|
|
|
33
33
|
# --- 🛡️ GİZLİLİK KALKANI ---
|
|
34
34
|
# Tarayıcı oturumları ve gizli ayarlar asla sızmamalı
|
|
35
35
|
recursive-exclude kick_session *
|
|
36
|
-
recursive-exclude .env *
|
|
36
|
+
recursive-exclude .env *
|
|
37
|
+
|
|
38
|
+
# --- Debug ---
|
|
39
|
+
exclude Zoro.py
|
|
40
|
+
exclude *.json
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kickzero
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.2
|
|
4
4
|
Summary: A modular and asynchronous framework for Kick.com chatbots.
|
|
5
5
|
Home-page: https://github.com/SeymenSozen/KickZero
|
|
6
6
|
Author: Seymen Sözen
|
|
@@ -25,7 +25,7 @@ Dynamic: requires-dist
|
|
|
25
25
|
Dynamic: requires-python
|
|
26
26
|
Dynamic: summary
|
|
27
27
|
|
|
28
|
-
# 🏴☠️ KickZero Framework (v1.3.
|
|
28
|
+
# 🏴☠️ KickZero Framework (v1.3.2)
|
|
29
29
|
|
|
30
30
|

|
|
31
31
|

|
|
@@ -111,6 +111,8 @@ class zerror:
|
|
|
111
111
|
color = Fore.WHITE
|
|
112
112
|
print(f"{color}{emoji}{Style.BRIGHT}[{level_text.upper()}] {Fore.WHITE}{message}{Style.RESET_ALL}")
|
|
113
113
|
|
|
114
|
+
|
|
115
|
+
### Runners
|
|
114
116
|
class tasks:
|
|
115
117
|
"""
|
|
116
118
|
### 🇹🇷 [TR] Görev ve Rutin Yöneticisi
|
|
@@ -174,7 +176,6 @@ class tasks:
|
|
|
174
176
|
level="succ",
|
|
175
177
|
msg_tr=f"Bot {bot.user_name} adıyla giriş yaptı ve filodaki {len(bot.channels)} kanalı dinliyor!",
|
|
176
178
|
msg_en=f"Bot logged in as {bot.user_name} and listening to {len(bot.channels)} channels in the fleet!")
|
|
177
|
-
|
|
178
179
|
class engine:
|
|
179
180
|
"""
|
|
180
181
|
### 🇹🇷 [TR] WebSocket ve Bağlantı Motoru
|
|
@@ -218,9 +219,20 @@ class engine:
|
|
|
218
219
|
listens to parse the event type and routes it to the specific processor.)
|
|
219
220
|
"""
|
|
220
221
|
@staticmethod
|
|
221
|
-
def connect(bot):
|
|
222
|
-
|
|
223
|
-
|
|
222
|
+
async def connect(bot:'kickbot'):
|
|
223
|
+
while True:
|
|
224
|
+
try:
|
|
225
|
+
websocket = await websockets.connect(f"wss://ws-{bot.cluster}.pusher.com/app/{bot.app_key}?protocol=7&client=js&version=7.6.0", open_timeout=30)
|
|
226
|
+
return websocket
|
|
227
|
+
except (asyncio.TimeoutError, websockets.exceptions.InvalidHandshake, websockets.exceptions.ConnectionClosed):
|
|
228
|
+
zerror.log(level="warning", msg_tr="Bağlantı zaman aşımına uğradı veya el sıkışma başarısız. 5sn sonra tekrar deneniyor...")
|
|
229
|
+
await asyncio.sleep(5)
|
|
230
|
+
continue
|
|
231
|
+
except Exception as e:
|
|
232
|
+
zerror.log(level="error", msg_tr=f"Beklenmedik bir hata oluştu: {e}")
|
|
233
|
+
await asyncio.sleep(5)
|
|
234
|
+
|
|
235
|
+
|
|
224
236
|
@staticmethod
|
|
225
237
|
async def subscribe_to_chatroom(ch, websocket):
|
|
226
238
|
await websocket.send(json.dumps({ "event": "pusher:subscribe","data": {"channel": f"chatrooms.{ch.chat_id}.v2"}})) # Mod actions ve chat
|
|
@@ -260,7 +272,6 @@ class engine:
|
|
|
260
272
|
await processor.process_channel_points(bot,raw_data)
|
|
261
273
|
elif data.get("event") == "pusher:ping":
|
|
262
274
|
await engine.keep_alive(bot,websocket)
|
|
263
|
-
|
|
264
275
|
class processor:
|
|
265
276
|
"""
|
|
266
277
|
### 🇹🇷 [TR] Veri İşleme ve Olay Dağıtıcı (Event Dispatcher)
|
|
@@ -357,7 +368,7 @@ class processor:
|
|
|
357
368
|
asyncio.create_task(processor.execute(config["func"], rctx, []))
|
|
358
369
|
zerror.log(level="succ", msg=log_msg)
|
|
359
370
|
|
|
360
|
-
###
|
|
371
|
+
### Contexts
|
|
361
372
|
class message_context:
|
|
362
373
|
"""
|
|
363
374
|
### 🇹🇷 [TR] Bağlam Merkezi (context)
|
|
@@ -1006,8 +1017,9 @@ class kickbot:
|
|
|
1006
1017
|
zerror.log(level="succ", msg_tr=f"KickZero Framework Aktif! (Kaptan: {self.user_name})", msg_en=f"KickZero Framework Active! (Captain: {self.user_name})")
|
|
1007
1018
|
while True:
|
|
1008
1019
|
try:
|
|
1009
|
-
async with engine.connect(self) as websocket:
|
|
1020
|
+
async with await engine.connect(self) as websocket:
|
|
1010
1021
|
await engine.subscribe_all(self,websocket)
|
|
1022
|
+
await asyncio.sleep(0.01)
|
|
1011
1023
|
while True:
|
|
1012
1024
|
await engine.process_all_events(self,websocket)
|
|
1013
1025
|
|
|
@@ -1035,4 +1047,6 @@ class kickbot:
|
|
|
1035
1047
|
except Exception as e:
|
|
1036
1048
|
zerror.log(level="error",
|
|
1037
1049
|
msg_tr=f"Bot başlatılırken beklenmedik bir hata: {e}",
|
|
1038
|
-
msg_en=f"Unexpected error while starting the bot: {e}")
|
|
1050
|
+
msg_en=f"Unexpected error while starting the bot: {e}")
|
|
1051
|
+
|
|
1052
|
+
# Luffy Was Here
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kickzero
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.2
|
|
4
4
|
Summary: A modular and asynchronous framework for Kick.com chatbots.
|
|
5
5
|
Home-page: https://github.com/SeymenSozen/KickZero
|
|
6
6
|
Author: Seymen Sözen
|
|
@@ -25,7 +25,7 @@ Dynamic: requires-dist
|
|
|
25
25
|
Dynamic: requires-python
|
|
26
26
|
Dynamic: summary
|
|
27
27
|
|
|
28
|
-
# 🏴☠️ KickZero Framework (v1.3.
|
|
28
|
+
# 🏴☠️ KickZero Framework (v1.3.2)
|
|
29
29
|
|
|
30
30
|

|
|
31
31
|

|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|