mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2025-12-29 17:44:50 +00:00
Undefined name detected # PYL-E0602
This commit is contained in:
parent
a55824673b
commit
14530b58b0
6 changed files with 8 additions and 7 deletions
|
|
@ -40,7 +40,7 @@ MOD_NOLOAD = ["subscene_dl"]
|
|||
HELPABLE = {}
|
||||
cleanmode = {}
|
||||
botStartTime = time.time()
|
||||
misskaty_version = "v2.9.1 - Stable"
|
||||
misskaty_version = "v2.9.2 - Stable"
|
||||
|
||||
# Pyrogram Bot Client
|
||||
app = Client(
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import asyncio
|
||||
import asyncio, logging
|
||||
from functools import wraps
|
||||
|
||||
LOGGER = logging.getLogger(__name__)
|
||||
|
||||
def asyncify(func):
|
||||
async def inner(*args, **kwargs):
|
||||
|
|
@ -18,6 +19,6 @@ def new_task(func):
|
|||
loop = asyncio.get_running_loop()
|
||||
return loop.create_task(func(*args, **kwargs))
|
||||
except Exception as e:
|
||||
LOGGER.error(f"Failed to create task for {func.__name__} : {e}")
|
||||
LOGGER.error(f"Failed to create task for {func.__name__} : {e}") # skipcq: PYL-E0602
|
||||
|
||||
return wrapper
|
||||
|
|
|
|||
|
|
@ -854,7 +854,7 @@ async def set_chat_photo(self: Client, ctx: Message):
|
|||
if file.file_size > 5000000:
|
||||
return await ctx.reply("File size too large.")
|
||||
|
||||
file = await reply.download()
|
||||
photo = await reply.download()
|
||||
try:
|
||||
await ctx.chat.set_photo(photo=photo)
|
||||
await ctx.reply_text("Successfully Changed Group Photo")
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from pyrogram import Client, filters
|
||||
from pyrogram.errors import ChannelPrivate
|
||||
from pyrogram.errors import ChannelPrivate, PeerIdInvalid
|
||||
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup, Message
|
||||
|
||||
from database.users_chats_db import db
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ async def download(client, message):
|
|||
try:
|
||||
downloader.start(blocking=False)
|
||||
except Exception as err:
|
||||
return await ctx.edit(str(err))
|
||||
return await message.edit_msg(str(err))
|
||||
c_time = time.time()
|
||||
while not downloader.isFinished():
|
||||
total_length = downloader.filesize or None
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ async def inline_menu(_, inline_query: InlineQuery):
|
|||
**MongoDB:** `{aspymon_ver}`
|
||||
**Platform:** `{platform}`
|
||||
**Bot:** {(await app.get_me()).first_name}
|
||||
"""
|
||||
"""
|
||||
if USER_SESSION:
|
||||
msg += f"**UserBot:** {(await user.get_me()).first_name}"
|
||||
answerss = [
|
||||
|
|
|
|||
Loading…
Reference in a new issue