Undefined name detected # PYL-E0602

This commit is contained in:
yasirarism 2023-06-27 03:33:45 +00:00 committed by GitHub
parent a55824673b
commit 14530b58b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 7 deletions

View file

@ -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(

View file

@ -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

View file

@ -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")

View file

@ -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

View file

@ -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

View file

@ -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 = [