Fixes v0.0.6 2021/05/09

* PluginChannel Error Fixed

* Fixed Stop autoname + minor bugs


Co-authored-by: Anonymous <69723581+New-dev0@users.noreply.github.com>
This commit is contained in:
Danish
2021-05-09 00:19:24 +05:30
committed by GitHub
parent 702dfabc31
commit 427b6f5dfa
7 changed files with 91 additions and 39 deletions

View File

@@ -38,10 +38,10 @@ async def autopic(e):
await eor(e, get_string("autopic_3").format(search))
udB.set("AUTOPIC", "True")
while True:
ge = udB.get("AUTOPIC")
if not ge == "True":
return
for lie in clls:
ge = udB.get("AUTOPIC")
if not ge == "True":
return
au = "https://unsplash.com" + lie["href"]
et = await ultroid_bot(getweb(au))
try:
@@ -56,7 +56,7 @@ async def autopic(e):
file = await ultroid_bot.upload_file(kar)
await ultroid_bot(UploadProfilePhotoRequest(file))
os.remove(kar)
await asyncio.sleep(1100)
await asyncio.sleep(1111)
@ultroid_cmd(pattern="stoppic$")

View File

@@ -30,7 +30,13 @@ async def _(e):
if not (t or t.isdigit()):
t = 100
else:
t = int(t)
try:
t = int(t)
except BaseException:
try:
t = await ban_time(e, t)
except BaseException:
return await eod(e, "`Incorrect Format`")
await eod(e, f"Starting Fake Typing For {t} sec.")
async with e.client.action(e.chat_id, "typing"):
await asyncio.sleep(t)
@@ -42,7 +48,13 @@ async def _(e):
if not (t or t.isdigit()):
t = 100
else:
t = int(t)
try:
t = int(t)
except BaseException:
try:
t = await ban_time(e, t)
except BaseException:
return await eod(e, "`Incorrect Format`")
await eod(e, f"Starting Fake audio recording For {t} sec.")
async with e.client.action(e.chat_id, "record-audio"):
await asyncio.sleep(t)
@@ -54,7 +66,13 @@ async def _(e):
if not (t or t.isdigit()):
t = 100
else:
t = int(t)
try:
t = int(t)
except BaseException:
try:
t = await ban_time(e, t)
except BaseException:
return await eod(e, "`Incorrect Format`")
await eod(e, f"Starting Fake video recording For {t} sec.")
async with e.client.action(e.chat_id, "record-video"):
await asyncio.sleep(t)
@@ -66,7 +84,13 @@ async def _(e):
if not (t or t.isdigit()):
t = 100
else:
t = int(t)
try:
t = int(t)
except BaseException:
try:
t = await ban_time(e, t)
except BaseException:
return await eod(e, "`Incorrect Format`")
await eod(e, f"Starting Fake Game Playing For {t} sec.")
async with e.client.action(e.chat_id, "game"):
await asyncio.sleep(t)

View File

@@ -26,6 +26,7 @@
import os
import shutil
import time
import cv2
import imutils
@@ -47,16 +48,25 @@ if not os.path.exists("pdf/"):
async def pdfseimg(event):
ok = await event.get_reply_message()
msg = event.pattern_match.group(1)
if not ok and ok.document and ok.document.mime_type == "application/pdf":
if not (ok and (ok.document and (ok.document.mime_type == "application/pdf"))):
await eor(event, "`Reply The pdf u Want to Download..`")
return
xx = await eor(event, "Processing...")
file = ok.media.document
k = time.time()
filename = "hehe.pdf"
result = await downloader(
"pdf/" + filename,
file,
xx,
k,
"Downloading " + filename + "...",
)
await result.delete()
pdfp = "pdf/hehe.pdf"
pdfp.replace(".pdf", "")
pdf = PdfFileReader(pdfp)
if not msg:
d = os.path.join("pdf/", "hehe.pdf")
await event.client.download_media(ok, d)
pdfp = "pdf/hehe.pdf"
pdfp.replace(".pdf", "")
pdf = PdfFileReader(pdfp)
for num in range(pdf.numPages):
pw = PdfFileWriter()
pw.addPage(pdf.getPage(num))
@@ -72,11 +82,6 @@ async def pdfseimg(event):
await xx.delete()
if msg:
o = int(msg) - 1
d = os.path.join("pdf/", "hehe.pdf")
await event.client.download_media(ok, d)
pdfp = "pdf/hehe.pdf"
pdfp.replace(".pdf", "")
pdf = PdfFileReader(pdfp)
pw = PdfFileWriter()
pw.addPage(pdf.getPage(o))
with open(os.path.join("ult.png"), "wb") as f:
@@ -88,7 +93,6 @@ async def pdfseimg(event):
reply_to=event.reply_to_msg_id,
)
os.remove("ult.png")
await xx.delete()
@ultroid_cmd(
@@ -101,8 +105,19 @@ async def pdfsetxt(event):
await eor(event, "`Reply The pdf u Want to Download..`")
return
xx = await eor(event, "`Processing...`")
file = ok.media.document
k = time.time()
filename = ok.file.name
result = await downloader(
filename,
file,
xx,
k,
"Downloading " + filename + "...",
)
await result.delete()
dl = result.name
if not msg:
dl = await event.client.download_media(ok)
pdf = PdfFileReader(dl)
text = f"{dl.split('.')[0]}.txt"
with open(text, "w") as f:
@@ -123,7 +138,6 @@ async def pdfsetxt(event):
return
if "_" in msg:
u, d = msg.split("_")
dl = await event.client.download_media(ok)
a = PdfFileReader(dl)
str = ""
for i in range(int(u) - 1, int(d)):
@@ -140,7 +154,6 @@ async def pdfsetxt(event):
os.remove(dl)
else:
u = int(msg) - 1
dl = await event.client.download_media(ok)
a = PdfFileReader(dl)
str = a.getPage(u).extractText()
text = f"{dl.split('.')[0]} Pg-{msg}.txt"
@@ -153,7 +166,6 @@ async def pdfsetxt(event):
)
os.remove(text)
os.remove(dl)
await xx.delete()
@ultroid_cmd(

View File

@@ -34,7 +34,7 @@ async def siesace(e):
try:
k = (r.get(url)).json()[0]
except IndexError:
return await eod(e, "`Song Not Found.. `")
return await eod(lol, "`Song Not Found.. `")
title = k["song"]
urrl = k["media_url"]
img = k["image"]

View File

@@ -1 +1 @@
py-Ultroid==2021.5.8
py-Ultroid==2021.5.9

View File

@@ -1,31 +1,47 @@
# Local Requirements.
asyncurban
carbonnow
cairosvg
emoji
git+https://github.com/buddhhu/search-engine-parser.git
git+https://github.com/ProgrammingError/rextester_py.git
GitPython
google-api-python-client==1.7.11
googletrans==3.1.0a0
heroku3
httplib2==0.13.1
html-telegraph-poster
googletrans==4.0.0rc1
git+https://github.com/ProgrammingError/heroku3.py
imutils
lottie
lxml
moviepy
numpy
oauth2client==4.1.3
opencv-python-headless
Pillow>=7.0.0
play-scraper
psutil
py-Ultroid
pyaml
PyDictionary
PyPDF2
psutil
pytz
requests>=2.18.4
scikit-image
speedtest-cli==2.1.2
selenium
speedtest-cli==2.1.3
telegraph
validators
youtube-search-python
youtube_dl
youtube-search-python
google-api-python-client==1.7.11
google-auth==1.27.1
google-auth-httplib2==0.0.4
google-auth-oauthlib==0.4.4
googletrans==4.0.0rc1
oauth2client==4.1.3
httplib2==0.13.1
git+https://github.com/buddhhu/search-engine-parser.git
git+https://github.com/buddhhu/ofox.git
google-assistant-grpc
tenacity
google-assistant-sdk
gingerit
html-telegraph-poster
pyyaml
hachoir
aria2p
gdown