From d529544c7a05f0776e5d5fab7ca4d86a282bbca5 Mon Sep 17 00:00:00 2001 From: illvart Date: Fri, 20 Mar 2026 03:50:30 +0700 Subject: [PATCH] update --- ds/kasta.py | 4 ++-- ds/patcher.py | 2 +- ds/plugins/delayspam.py | 4 ++-- ds/plugins/misc.py | 8 ++++---- requirements-dev.txt | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ds/kasta.py b/ds/kasta.py index b75c0be..4fbb041 100644 --- a/ds/kasta.py +++ b/ds/kasta.py @@ -105,9 +105,9 @@ async def __join_us(self) -> None: try: await self.join_chat(-1001174631272) await asyncio.sleep(random.uniform(3.5, 6.5)) - except BaseException: + except Exception: pass try: await self.join_chat(-1001699144606) - except BaseException: + except Exception: pass diff --git a/ds/patcher.py b/ds/patcher.py index 281a118..a8949a2 100644 --- a/ds/patcher.py +++ b/ds/patcher.py @@ -89,5 +89,5 @@ def client(self) -> Client: async def delete(self, revoke: bool = True) -> bool: try: return await self.old_delete(revoke=revoke) - except BaseException: + except Exception: return False diff --git a/ds/plugins/delayspam.py b/ds/plugins/delayspam.py index fbec4d9..e1871c7 100644 --- a/ds/plugins/delayspam.py +++ b/ds/plugins/delayspam.py @@ -45,7 +45,7 @@ async def _ds(c, m): try: args = cmd[1:] delay, count = int(args[0]), int(args[1]) - except BaseException: + except Exception: return await eor(m, f"`{Var.HANDLER}ds{ds} [delay] [count] [forward (reply only)] [text/reply]`", time=6) is_text, is_forward = False, False if m.reply_to_message_id: @@ -228,7 +228,7 @@ async def eor( ) if not time: return result - except BaseException: + except Exception: result = await message.reply( text, quote=True, diff --git a/ds/plugins/misc.py b/ds/plugins/misc.py index 63691e0..d94f336 100644 --- a/ds/plugins/misc.py +++ b/ds/plugins/misc.py @@ -40,7 +40,7 @@ async def _ping(_, m): try: await m.delete() await msg.edit(text) - except BaseException: + except Exception: await msg.delete() await m.reply( text, @@ -226,7 +226,7 @@ async def _join(c, m): await m.edit(f"🔃 Join retry {count}...") await asyncio.sleep(random.uniform(6.5, 8.5)) continue - except BaseException: + except Exception: break if state: break @@ -256,7 +256,7 @@ async def _leave(c, m): state = False try: state = bool(await c.leave_chat(chat_id, delete=True)) - except BaseException: + except Exception: pass text = "✅ Leaved" if state else "❌ Error" await m.edit(text) @@ -277,6 +277,6 @@ async def _kickme(c, m): """ try: await c.leave_chat(m.chat.id, delete=True) - except BaseException: + except Exception: pass await m.delete() diff --git a/requirements-dev.txt b/requirements-dev.txt index 2964b1b..535118b 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1 +1 @@ -ruff==0.15.6 +ruff==0.15.7