Skip to content

Commit

Permalink
updated tasks logic
Browse files Browse the repository at this point in the history
Desamod committed Nov 22, 2024
1 parent a8e7277 commit 3a70d03
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions bot/core/tapper.py
Original file line number Diff line number Diff line change
@@ -86,11 +86,15 @@ async def processing_tasks(self, http_client: cloudscraper.CloudScraper):
if progress['current'] < progress['total']:
is_partner = task.get('partner', False)
if task['code'] == 'telegram':
if not settings.JOIN_TG_CHANNELS:
continue
url = task['data']
logger.info(f"{self.session_name} | Performing TG subscription to <lc>{url}</lc>")
await self.tg_session.join_tg_channel(url)
if task['flag'] == 0:
logger.info(f"{self.session_name} | Performing TG task <lc>{task['title']}</lc>")
else:
if not settings.JOIN_TG_CHANNELS:
continue

url = task['data']
logger.info(f"{self.session_name} | Performing TG subscription to <lc>{url}</lc>")
await self.tg_session.join_tg_channel(url)
elif task['code'] == 'invite':
counter = task['counter']
referrals = await self.get_referrals(http_client)

0 comments on commit 3a70d03

Please sign in to comment.