Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
illvart committed May 27, 2024
1 parent a1e0b75 commit 31e9d66
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
4 changes: 3 additions & 1 deletion ds/plugins/delayspam.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ async def _ds(c, m):
await copy(c, message, chat_id, delay)
except RPCError:
pass
except:
except Exception as err:
c.log.error(err)
c.log.exception(err)
break
get_task(ds).discard(chat_id)

Expand Down
12 changes: 12 additions & 0 deletions ds/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
# < https://github.com/kastaid/ds/blob/main/LICENSE/ >.

import sys
from asyncio import sleep
from contextlib import suppress
from platform import version, machine
from random import randrange
from time import time
from pyrogram.client import Client
from pyrogram.enums import ParseMode
Expand Down Expand Up @@ -47,6 +50,7 @@ async def get_me(
async def start(self) -> None:
try:
self.log.info("Starting Userbot Client...")
await sleep(randrange(3, 6))
await super().start()
except Exception as err:
self.log.exception(err)
Expand All @@ -57,10 +61,18 @@ async def start(self) -> None:
user_details += f"\nLast Name: {self.me.last_name}" if self.me.last_name else ""
user_details += f"\nUsername: {self.me.username}" if self.me.username else ""
self.log.info(user_details)
await self.join_us()
done = time_formatter((time() - StartTime) * 1000)
self.log.success(f">> 🔥 USERBOT RUNNING IN {done} !!")
Var.IS_STARTUP = True

async def join_us(self) -> None:
with suppress(BaseException):
await self.join_chat(-1001174631272)
await sleep(3)
with suppress(BaseException):
await self.join_chat(-1001699144606)

async def answer(
self,
callback: CallbackQuery,
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ruff==0.4.4
ruff==0.4.5
black==24.4.2
isort==5.13.2

0 comments on commit 31e9d66

Please sign in to comment.