mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2025-12-29 09:44:50 +00:00
Minor fix todaay
This commit is contained in:
parent
4c87d634a6
commit
76e7348960
11 changed files with 16 additions and 11 deletions
|
|
@ -41,7 +41,7 @@ MOD_NOLOAD = ["subscene_dl"]
|
|||
HELPABLE = {}
|
||||
cleanmode = {}
|
||||
botStartTime = time.time()
|
||||
misskaty_version = "v2.10.14 - Stable"
|
||||
misskaty_version = "v2.10.15 - Stable"
|
||||
|
||||
# Pyrogram Bot Client
|
||||
app = Client(
|
||||
|
|
|
|||
|
|
@ -197,7 +197,10 @@ async def kickFunc(client: Client, ctx: Message, strings) -> "Message":
|
|||
@app.adminsOnly("can_restrict_members")
|
||||
@use_chat_lang()
|
||||
async def banFunc(client, message, strings):
|
||||
try:
|
||||
user_id, reason = await extract_user_and_reason(message, sender_chat=True)
|
||||
except UsernameNotOccupied:
|
||||
return await message.reply_msg("Sorry, i didn't know that user.")
|
||||
|
||||
if not user_id:
|
||||
return await message.reply_text(strings("user_not_found"))
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ def shorten(description, info="anilist.co"):
|
|||
|
||||
@app.on_message(filters.command("anime", COMMAND_HANDLER))
|
||||
async def anime_search(_, mesg):
|
||||
search = mesg.text.split(" ", 1)
|
||||
search = mesg.text.split(None, 1)
|
||||
reply = await mesg.reply("⏳ <i>Please wait ...</i>", quote=True)
|
||||
if len(search) == 1:
|
||||
return await reply.edit("⚠️ <b>Give Anime name please.</b>")
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ async def bard_chatbot(_, ctx: Message, strings):
|
|||
msg = await ctx.reply_msg(strings("find_answers_str"), quote=True)
|
||||
try:
|
||||
req = await fetch.get(
|
||||
f"https://yasirapi.eu.org/bard?input={ctx.text.split(' ', 1)[1]}"
|
||||
f"https://yasirapi.eu.org/bard?input={ctx.text.split(maxsplit=1)[1]}"
|
||||
)
|
||||
random_choice = random.choice(req.json().get("choices"))
|
||||
await msg.edit_msg(
|
||||
|
|
|
|||
|
|
@ -380,7 +380,7 @@ async def cmd_eval(self: Client, ctx: Message, strings) -> Optional[str]:
|
|||
else await ctx.reply_msg(strings("run_eval"), quote=True)
|
||||
)
|
||||
code = (
|
||||
ctx.text.split(" ", 1)[1] if ctx.command else ctx.text.split("\napp.run()")[0]
|
||||
ctx.text.split(maxsplit=1)[1] if ctx.command else ctx.text.split("\napp.run()")[0]
|
||||
)
|
||||
out_buf = io.StringIO()
|
||||
out = ""
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ async def beriharapan(c, m):
|
|||
reply = m.reply_to_message
|
||||
if not reply and m.command == 1:
|
||||
return m.reply("Harap berikan kalimat yang ingin diberi pada seseorang")
|
||||
pesan = m.text.split(" ", 1)[1]
|
||||
pesan = m.text.split(maxsplit=1)[1]
|
||||
reply_name = reply.from_user.mention if reply.from_user else reply.sender_chat.title
|
||||
sender_name = m.from_user.mention if m.from_user else m.sender_chat.title
|
||||
await reply.reply(f"{sender_name} memberikan {pesan} pada {reply_name}")
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ async def imdb_choose(_, ctx: Message):
|
|||
return await ctx.reply_msg(
|
||||
"Cannot identify user, please use in private chat.", del_in=7
|
||||
)
|
||||
kuery = ctx.text.split()[1]
|
||||
kuery = ctx.text.split(None, 1)[1]
|
||||
is_imdb, lang = await is_imdbset(ctx.from_user.id)
|
||||
if is_imdb:
|
||||
if lang == "eng":
|
||||
|
|
|
|||
|
|
@ -83,6 +83,8 @@ async def current_chat_permissions(chat_id):
|
|||
perm = (await app.get_chat(chat_id)).permissions
|
||||
if perm.can_send_messages:
|
||||
perms.append("can_send_messages")
|
||||
else:
|
||||
LOGGER.info(f"debug perm: {perm}") # Temporary debug, idk why give error no object
|
||||
if perm.can_send_media_messages:
|
||||
perms.append("can_send_media_messages")
|
||||
if perm.can_send_audios:
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ async def stackoverflow(_, message):
|
|||
async def gsearch(_, message):
|
||||
if len(message.command) == 1:
|
||||
return await message.reply("Give a query to search in Google!")
|
||||
query = message.text.split(" ", maxsplit=1)[1]
|
||||
query = message.text.split(maxsplit=1)[1]
|
||||
msg = await message.reply_text(f"**Googling** for `{query}` ...")
|
||||
try:
|
||||
gs = await fetch.get(
|
||||
|
|
|
|||
|
|
@ -532,7 +532,7 @@ async def getSame(msg, query, current_page, strings):
|
|||
@app.on_cmd("samehadaku", no_channel=True)
|
||||
@use_chat_lang()
|
||||
async def same_search(_, msg, strings):
|
||||
query = msg.text.split(" ", 1)[1] if len(msg.command) > 1 else None
|
||||
query = msg.text.split(maxsplit=1)[1] if len(msg.command) > 1 else None
|
||||
bmsg = await msg.reply_msg(strings("get_data"), quote=True)
|
||||
sameres, PageLen = await getSame(bmsg, query, 1, strings)
|
||||
if not sameres:
|
||||
|
|
@ -1261,7 +1261,7 @@ async def savefilm21_scrap(_, callback_query, strings):
|
|||
@use_chat_lang()
|
||||
async def muviku_scrap(_, message, strings):
|
||||
try:
|
||||
link = message.text.split(" ", maxsplit=1)[1]
|
||||
link = message.text.split(maxsplit=1)[1]
|
||||
html = await fetch.get(link)
|
||||
soup = BeautifulSoup(html.text, "lxml")
|
||||
res = soup.find_all(class_="smokeurl")
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ def rand_key():
|
|||
async def ytsearch(_, ctx: Message, strings):
|
||||
if len(ctx.command) == 1:
|
||||
return await ctx.reply_msg(strings("no_query"))
|
||||
query = ctx.text.split(" ", maxsplit=1)[1]
|
||||
query = ctx.text.split(maxsplit=1)[1]
|
||||
search_key = rand_key()
|
||||
YT_DB[search_key] = query
|
||||
search = await main.VideosSearch(query).next()
|
||||
|
|
|
|||
Loading…
Reference in a new issue