Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
handle leech with user in private chat

Signed-off-by: anasty17 <[email protected]>
  • Loading branch information
anasty17 committed Dec 12, 2023
1 parent 573dff9 commit d3ade24
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions bot/helper/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ async def beforeStart(self):
if not is_gdrive_id(self.link):
raise ValueError(self.link)

self.userTransmission = IS_PREMIUM_USER and (
self.user_dict.get("user_transmission")
or config_dict["USER_TRANSMISSION"]
and "user_transmission" not in self.user_dict
)

if not self.isLeech:
self.stopDuplicate = (
self.user_dict.get("stop_duplicate")
Expand Down Expand Up @@ -257,11 +263,6 @@ async def beforeStart(self):
or config_dict["EQUAL_SPLITS"]
and "equal_splits" not in self.user_dict
)
self.userTransmission = IS_PREMIUM_USER and (
self.user_dict.get("user_transmission")
or config_dict["USER_TRANSMISSION"]
and "user_transmission" not in self.user_dict
)
self.maxSplitSize = MAX_SPLIT_SIZE if self.userTransmission else 2097152000
self.splitSize = min(self.splitSize, self.maxSplitSize)
self.upDest = (
Expand Down

0 comments on commit d3ade24

Please sign in to comment.