mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-07 20:34:52 +00:00
fix
This commit is contained in:
parent
1768966328
commit
e50348be68
3 changed files with 6 additions and 4 deletions
|
|
@ -4,6 +4,7 @@ import os
|
||||||
import time
|
import time
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from logging import getLogger
|
from logging import getLogger
|
||||||
|
from urllib.parse import unquote
|
||||||
|
|
||||||
from pyrogram import filters
|
from pyrogram import filters
|
||||||
from pyrogram.file_id import FileId
|
from pyrogram.file_id import FileId
|
||||||
|
|
@ -116,7 +117,7 @@ async def download(client, message):
|
||||||
try:
|
try:
|
||||||
current_message = "Trying to download...\n"
|
current_message = "Trying to download...\n"
|
||||||
current_message += f"URL: <code>{url}</code>\n"
|
current_message += f"URL: <code>{url}</code>\n"
|
||||||
current_message += f"File Name: <code>{custom_file_name}</code>\n"
|
current_message += f"File Name: <code>{unquote(custom_file_name)}</code>\n"
|
||||||
current_message += f"Speed: {speed}\n"
|
current_message += f"Speed: {speed}\n"
|
||||||
current_message += f"{progress_str}\n"
|
current_message += f"{progress_str}\n"
|
||||||
current_message += f"{downloaded} of {humanbytes(total_length)}\n"
|
current_message += f"{downloaded} of {humanbytes(total_length)}\n"
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ from asyncio import gather, sleep
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from logging import getLogger
|
from logging import getLogger
|
||||||
from pySmartDL import SmartDL
|
from pySmartDL import SmartDL
|
||||||
|
from urllib.parse import unquote
|
||||||
|
|
||||||
from pyrogram import enums, filters, Client
|
from pyrogram import enums, filters, Client
|
||||||
from pyrogram.errors import FloodWait
|
from pyrogram.errors import FloodWait
|
||||||
|
|
@ -73,7 +74,7 @@ async def genss(self: Client, ctx: Message, strings):
|
||||||
try:
|
try:
|
||||||
current_message = "Trying to download...\n"
|
current_message = "Trying to download...\n"
|
||||||
current_message += f"URL: <code>{url}</code>\n"
|
current_message += f"URL: <code>{url}</code>\n"
|
||||||
current_message += f"File Name: <code>{file_name}</code>\n"
|
current_message += f"File Name: <code>{unquote(file_name)}</code>\n"
|
||||||
current_message += f"Speed: {speed}\n"
|
current_message += f"Speed: {speed}\n"
|
||||||
current_message += f"{progress_str}\n"
|
current_message += f"{progress_str}\n"
|
||||||
current_message += f"{downloaded} of {humanbytes(total_length)}\n"
|
current_message += f"{downloaded} of {humanbytes(total_length)}\n"
|
||||||
|
|
@ -90,7 +91,7 @@ async def genss(self: Client, ctx: Message, strings):
|
||||||
await pesan.edit(f"Downloaded to <code>{download_file_path}</code> in {ms} seconds")
|
await pesan.edit(f"Downloaded to <code>{download_file_path}</code> in {ms} seconds")
|
||||||
try:
|
try:
|
||||||
images = await take_ss(download_file_path)
|
images = await take_ss(download_file_path)
|
||||||
await process.edit_msg(strings("up_progress"))
|
await pesan.edit_msg(strings("up_progress"))
|
||||||
await self.send_chat_action(chat_id=ctx.chat.id, action=enums.ChatAction.UPLOAD_PHOTO)
|
await self.send_chat_action(chat_id=ctx.chat.id, action=enums.ChatAction.UPLOAD_PHOTO)
|
||||||
try:
|
try:
|
||||||
await gather(
|
await gather(
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ async def getstickerid(self: Client, ctx: Message, strings):
|
||||||
if not ctx.from_user:
|
if not ctx.from_user:
|
||||||
return await ctx.reply("You're anon, unkang in my PM")
|
return await ctx.reply("You're anon, unkang in my PM")
|
||||||
if sticker := ctx.reply_to_message.sticker:
|
if sticker := ctx.reply_to_message.sticker:
|
||||||
if str(ctx.from_user.id) in sticker.set_name:
|
if str(ctx.from_user.id) not in sticker.set_name:
|
||||||
return await ctx.reply_msg("This sticker is not your pack, don't do it..")
|
return await ctx.reply_msg("This sticker is not your pack, don't do it..")
|
||||||
pp = await ctx.reply_msg(strings("unkang_msg"))
|
pp = await ctx.reply_msg(strings("unkang_msg"))
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue