* Beta

* Move append items to list definition (#15)

* Move append items to list definition

* Format code with black and isort

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* Remove commented out code (#14)

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* Use identity check for comparison to a singleton (#13)

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* Convert string with anomalous backslash into a raw string (#12)

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
This commit is contained in:
yasirarism 2023-01-10 20:52:17 +07:00 committed by GitHub
parent 8dd0d55b1f
commit 6851e05745
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 12 additions and 19 deletions

View file

@ -4,4 +4,4 @@ API_ID=
SUPPORT_CHAT=YasirPediaChannel
DATABASE_URI=mongodb+srv://
BOT_TOKEN=
LOG_CHANNEL=-
LOG_CHANNEL=-100

View file

@ -36,7 +36,6 @@ async def progress_for_pyrogram(current, total, ud_type, message, start):
humanbytes(current),
humanbytes(total),
humanbytes(speed),
# elapsed_time if elapsed_time != "" else "0 s",
estimated_total_time if estimated_total_time != "" else "0 s",
)
try:

View file

@ -276,7 +276,7 @@ async def list_ban_(c, message):
)
try:
msgtext = (await app.get_messages(uname, mid)).text
gusernames = re.findall("@\w+", msgtext)
gusernames = re.findall(r"@\w+", msgtext)
except:
return await m.edit_text("Could not get group usernames")
count = 0
@ -325,7 +325,7 @@ async def list_unban_(c, message):
)
try:
msgtext = (await app.get_messages(uname, mid)).text
gusernames = re.findall("@\w+", msgtext)
gusernames = re.findall(r"@\w+", msgtext)
except:
return await m.edit_text("Could not get the group usernames")
count = 0

View file

@ -27,7 +27,7 @@ async def broadcast(bot, message):
pti, sh = await broadcast_messages(int(user["id"]), b_msg)
if pti:
success += 1
elif pti == False:
elif pti is False:
if sh == "Bocked":
blocked += 1
elif sh == "Deleted":

View file

@ -52,7 +52,6 @@ async def job_close():
tahun = now.strftime("%Y")
jam = now.strftime("%H:%M")
try:
# version = check_output(["git log -1 --date=format:v%y.%m%d.%H%M --pretty=format:%cd"], shell=True).decode()
reply_markup = InlineKeyboardMarkup(
[[InlineKeyboardButton(text="❤️", callback_data="nightmd")]]
)
@ -92,7 +91,6 @@ async def job_close_ymoviez():
tahun = now.strftime("%Y")
jam = now.strftime("%H:%M")
try:
# version = check_output(["git log -1 --date=format:v%y.%m%d.%H%M --pretty=format:%cd"], shell=True).decode()
reply_markup = InlineKeyboardMarkup(
[[InlineKeyboardButton(text="❤️", callback_data="nightmd")]]
)
@ -131,7 +129,6 @@ async def job_open():
tahun = now.strftime("%Y")
jam = now.strftime("%H:%M")
try:
# version = check_output(["git log -1 --date=format:v%y.%m%d.%H%M --pretty=format:%cd"], shell=True).decode()
reply_markup = InlineKeyboardMarkup(
[[InlineKeyboardButton(text="❤️", callback_data="nightmd")]]
)
@ -177,7 +174,6 @@ async def job_open_ymoviez():
tahun = now.strftime("%Y")
jam = now.strftime("%H:%M")
try:
# version = check_output(["git log -1 --date=format:v%y.%m%d.%H%M --pretty=format:%cd"], shell=True).decode()
reply_markup = InlineKeyboardMarkup(
[[InlineKeyboardButton(text="❤️", callback_data="nightmd")]]
)
@ -203,7 +199,6 @@ async def job_open_ymoviez():
@app.on_callback_query(filters.regex(r"^nightmd$"))
async def _callbackanightmd(c: Client, q: CallbackQuery):
# version = check_output(["git log -1 --date=format:v%y.%m%d.%H%M --pretty=format:%cd"], shell=True).decode()
await q.answer(
f"🔖 Hai, Aku {BOT_USERNAME} dibuat menggunakan Framework Pyrogram v{__version__} dan Python 3.10.\n\nMau buat bot seperti ini? Yuuk belajar di @botindonesia\nOwner: @YasirArisM",
show_alert=True,

View file

@ -114,14 +114,14 @@ async def create(_, message):
if not url:
return await msg.edit("Text Too Short Or File Problems")
button = [[InlineKeyboardButton("Open Link", url=url)]]
button.append(
button = [
[InlineKeyboardButton("Open Link", url=url)],
[
InlineKeyboardButton(
"Share Link", url=f"https://telegram.me/share/url?url={url}"
)
]
)
],
]
pasted = f"**Successfully pasted your data to Rentry<a href='{url}'>.</a>\n\nPaste by {uname}**"
await msg.edit(pasted, reply_markup=InlineKeyboardMarkup(button))
@ -191,14 +191,14 @@ async def create(_, message):
if not url:
return await msg.edit("Text Too Short Or File Problems")
button = [[InlineKeyboardButton("Open Link", url=url)]]
button.append(
button = [
[InlineKeyboardButton("Open Link", url=url)],
[
InlineKeyboardButton(
"Share Link", url=f"https://telegram.me/share/url?url={url}"
)
]
)
],
]
pasted = f"**Successfully pasted your data to Tempaste<a href='{url}'>.</a>\n\nPaste by {uname}**"
await msg.edit(pasted, reply_markup=InlineKeyboardMarkup(button))

View file

@ -197,7 +197,6 @@ async def ngefilm21(_, message):
judul = a.find_all(class_="r-snippetized")
b = i.find_all("a")[0]["href"]
data.append({"judul": judul[0].text, "link": b})
# print(f"{judul[0].text}{b}\n")
if not data:
return await msg.edit("Oops, data film tidak ditemukan.")
res = "".join(f"<b>{i['judul']}</b>\n{i['link']}\n" for i in data)