Skip to content

Commit

Permalink
Add UserName In Tag Msg....
Browse files Browse the repository at this point in the history
  • Loading branch information
Mirrordcrrv2 authored Apr 15, 2023
1 parent 5c580d2 commit 90b7080
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bot/helper/listeners/tasks_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,14 +366,15 @@ async def onUploadComplete(self, link, size, files, folders, mime_type, name, rc
if self.isSuperGroup and config_dict['INCOMPLETE_TASK_NOTIFIER'] and DATABASE_URL:
await DbManger().rm_complete_task(self.message.link)
LOGGER.info(f'Done Uploading {name}')
usr_name = self.message.from_user.first_name.replace('>', '').replace('<', '')
if self.isLeech:
msg = f'<b><i>{escape(name)}</i></b>\n'
msg += f'\n<b>• Size</b>: {get_readable_file_size(size)}'
msg += f'\n<b>• Total Files</b>: {folders}'
msg += f"\n<b>• Elapsed</b>: {get_readable_time(time() - self.extra_details['startTime'])}"
if mime_type != 0:
msg += f'\n<b>• Corrupted Files</b>: {mime_type}'
msg += f'\n<b>• Leeched by</b>: {self.tag}\n\n'
msg += f'\n<b>• Leeched by</b>: {usr_name}\n\n'
if not files:
await sendMessage(self.message, msg)
if self.logMessage:
Expand Down Expand Up @@ -417,7 +418,7 @@ async def onUploadComplete(self, link, size, files, folders, mime_type, name, rc
if mime_type == "Folder":
msg += f'\n<b>• SubFolders</b>: {folders}'
msg += f'\n<b>• Files</b>: {files}'
msg += f'\n<b>• Uploaded by</b>: {self.tag}'
msg += f'\n<b>• Uploaded by</b>: {usr_name}'
msg += f'\n<b>• Elapsed</b>: {get_readable_time(time() - self.extra_details["startTime"])}'
if link or rclonePath and config_dict['RCLONE_SERVE_URL']:
if drive_id and config_dict['GDRIVE_ID'] != drive_id:
Expand Down Expand Up @@ -581,4 +582,4 @@ async def onUploadError(self, error):
if not self.isClone:
await clean_download(self.dir)
if self.newDir:
await clean_download(self.newDir)
await clean_download(self.newDir)

0 comments on commit 90b7080

Please sign in to comment.