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.
@@ -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.1
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.1)
28
+ # 🏴‍☠️ KickZero Framework (v1.3.2)
29
29
 
30
30
  ![Python Version](https://img.shields.io/badge/python-3.8%2B-blue)
31
31
  ![License](https://img.shields.io/badge/license-Proprietary-red)
@@ -1,4 +1,4 @@
1
- # 🏴‍☠️ KickZero Framework (v1.3.1)
1
+ # 🏴‍☠️ KickZero Framework (v1.3.2)
2
2
 
3
3
  ![Python Version](https://img.shields.io/badge/python-3.8%2B-blue)
4
4
  ![License](https://img.shields.io/badge/license-Proprietary-red)
@@ -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
- websocket = websockets.connect(uri=f"wss://ws-{bot.cluster}.pusher.com/app/{bot.app_key}?protocol=7&client=js&version=7.6.0")
223
- return websocket
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
- ### contexts
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.1
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.1)
28
+ # 🏴‍☠️ KickZero Framework (v1.3.2)
29
29
 
30
30
  ![Python Version](https://img.shields.io/badge/python-3.8%2B-blue)
31
31
  ![License](https://img.shields.io/badge/license-Proprietary-red)
@@ -1,3 +1,4 @@
1
+ CHANGELOG.md
1
2
  MANIFEST.in
2
3
  README.md
3
4
  setup.py
@@ -6,7 +6,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
6
6
 
7
7
  setup(
8
8
  name="kickzero",
9
- version="1.3.1",
9
+ version="1.3.2",
10
10
  author="Seymen Sözen",
11
11
  description="A modular and asynchronous framework for Kick.com chatbots.",
12
12
  long_description=long_description,
File without changes
File without changes