Minor fix (#286)

This commit is contained in:
yasirarism 2023-09-24 22:21:45 +07:00 committed by GitHub
parent 519f51dc8a
commit c683a3ce9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 27 additions and 21 deletions

View file

@ -188,7 +188,7 @@ PERINGATAN: Menjual Kode Kepada Orang Lain Demi Uang *Dilarang Keras*. Tuhan sel
[readme-ko-url]: README.md [readme-ko-url]: README.md
[kofi-url]: https://ko-fi.com/yasirarism [kofi-url]: https://ko-fi.com/yasirarism
[paypal-url]: https://paypal.me/yasirarism [paypal-url]: https://paypal.me/yasirarism
[qris-url]: https://telegraph.yasirweb.eu.org/file/2acf7698f300ef3d9138f.jpg [qris-url]: https://img.yasirweb.eu.org/file/2acf7698f300ef3d9138f.jpg
[sociabuzz-url]: https://sociabuzz.com/yasirarism/tribe [sociabuzz-url]: https://sociabuzz.com/yasirarism/tribe
[saweria-url]: https://saweria.co/yasirarism [saweria-url]: https://saweria.co/yasirarism
[trakteer-url]: https://trakteer.id/yasir-aris-sp7cn [trakteer-url]: https://trakteer.id/yasir-aris-sp7cn

View file

@ -188,7 +188,7 @@ WARNING: Selling The Codes To Other People For Money Is *Strictly Prohibited*. G
[readme-ko-url]: README.id.md [readme-ko-url]: README.id.md
[kofi-url]: https://ko-fi.com/yasirarism [kofi-url]: https://ko-fi.com/yasirarism
[paypal-url]: https://paypal.me/yasirarism [paypal-url]: https://paypal.me/yasirarism
[qris-url]: https://telegraph.yasirweb.eu.org/file/9427d61d6968b8ee4fb2f.jpg [qris-url]: https://img.yasirweb.eu.org/file/9427d61d6968b8ee4fb2f.jpg
[sociabuzz-url]: https://sociabuzz.com/yasirarism/tribe [sociabuzz-url]: https://sociabuzz.com/yasirarism/tribe
[saweria-url]: https://saweria.co/yasirarism [saweria-url]: https://saweria.co/yasirarism
[trakteer-url]: https://trakteer.id/yasir-aris-sp7cn [trakteer-url]: https://trakteer.id/yasir-aris-sp7cn

View file

@ -41,7 +41,7 @@ MOD_NOLOAD = ["subscene_dl"]
HELPABLE = {} HELPABLE = {}
cleanmode = {} cleanmode = {}
botStartTime = time.time() botStartTime = time.time()
misskaty_version = "v2.10.15 - Stable" misskaty_version = "v2.11.1 - Stable"
# Pyrogram Bot Client # Pyrogram Bot Client
app = Client( app = Client(

View file

@ -59,7 +59,7 @@ async def handle_error(
with contextlib.suppress(Exception): with contextlib.suppress(Exception):
try: try:
await m.reply_photo( await m.reply_photo(
"https://telegraph.yasirweb.eu.org/file/3c9162b242567ae25d5af.jpg", "https://img.yasirweb.eu.org/file/3c9162b242567ae25d5af.jpg",
caption="An Internal Error Occurred while Processing your Command, the Logs have been sent to the Owners of this Bot. Sorry for Inconvenience", caption="An Internal Error Occurred while Processing your Command, the Logs have been sent to the Owners of this Bot. Sorry for Inconvenience",
) )
except: except:
@ -76,7 +76,7 @@ async def handle_error(
await m.message.delete() await m.message.delete()
try: try:
await m.reply_photo( await m.reply_photo(
"https://telegraph.yasirweb.eu.org/file/3c9162b242567ae25d5af.jpg", "https://img.yasirweb.eu.org/file/3c9162b242567ae25d5af.jpg",
caption="An Internal Error Occurred while Processing your Command, the Logs have been sent to the Owners of this Bot. Sorry for Inconvenience", caption="An Internal Error Occurred while Processing your Command, the Logs have been sent to the Owners of this Bot. Sorry for Inconvenience",
) )
except: except:

View file

@ -15,7 +15,7 @@ async def post_to_telegraph(is_media: bool, title=None, content=None, media=None
if is_media: if is_media:
# Create a Telegram Post Foto/Video # Create a Telegram Post Foto/Video
response = await telegraph.upload_file(media) response = await telegraph.upload_file(media)
return f"https://telegraph.yasirweb.eu.org{response[0]['src']}" return f"https://img.yasirweb.eu.org{response[0]['src']}"
# Create a Telegram Post using HTML Content # Create a Telegram Post using HTML Content
response = await telegraph.create_page( response = await telegraph.create_page(
title, title,

View file

@ -130,8 +130,8 @@ async def log_file(_, ctx: Message, strings):
@app.on_message(filters.command(["donate"], COMMAND_HANDLER)) @app.on_message(filters.command(["donate"], COMMAND_HANDLER))
async def donate(_, ctx: Message): async def donate(_, ctx: Message):
await ctx.reply_photo( await ctx.reply_photo(
"https://telegraph.yasirweb.eu.org/file/9427d61d6968b8ee4fb2f.jpg", "https://img.yasirweb.eu.org/file/9427d61d6968b8ee4fb2f.jpg",
caption=f"Hai {ctx.from_user.mention}, jika kamu merasa bot ini berguna kamu bisa melakukan donasi dengan scan QR menggunakan merchant yang support QRIS ya. Karena server bot ini menggunakan VPS dan tidaklah gratis. Terimakasih..\n\nHi {ctx.from_user.mention}, if you feel this bot is useful, you can make a donation via Paypal for international payment : https://paypal.me/yasirarism. Because this bot server is hosted in VPS and not free. Thank you..", caption=f"Hi {ctx.from_user.mention}, If you find this bot useful, you can make a donation to the account below. Because this bot server uses VPS and is not free. Thank You..\n\n<b>Indonesian Payment:</b>\n<b>QRIS:</b> https://img.yasirweb.eu.org/file/b1c86973ae4e55721983a.jpg (Yasir Store)\n<b>Mayar:</b> https://yasirarism.mayar.link/payme\n<b>Bank Jago:</b> 109641845083 (Yasir Aris M)\n\nFor international people can use PayPal to support me or via GitHub Sponsor:\nhttps://paypal.me/yasirarism\nhttps://github.com/sponsors/yasirarism\n\n<b>Source:</b> @BeriKopi",
) )

View file

@ -66,7 +66,7 @@ async def imdb_choose(_, ctx: Message):
buttons.row(InlineButton("🚩 Set Default Language", f"imdbset#{ctx.from_user.id}")) buttons.row(InlineButton("🚩 Set Default Language", f"imdbset#{ctx.from_user.id}"))
buttons.row(InlineButton("❌ Close", f"close#{ctx.from_user.id}")) buttons.row(InlineButton("❌ Close", f"close#{ctx.from_user.id}"))
await ctx.reply_photo( await ctx.reply_photo(
"https://telegraph.yasirweb.eu.org/file/270955ef0d1a8a16831a9.jpg", "https://img.yasirweb.eu.org/file/270955ef0d1a8a16831a9.jpg",
caption=f"Hi {ctx.from_user.mention}, Please select the language you want to use on IMDB Search. If you want use default lang for every user, click third button. So no need click select lang if use CMD.", caption=f"Hi {ctx.from_user.mention}, Please select the language you want to use on IMDB Search. If you want use default lang for every user, click third button. So no need click select lang if use CMD.",
reply_markup=buttons, reply_markup=buttons,
quote=True, quote=True,
@ -128,7 +128,7 @@ async def imdbsetlang(_, query: CallbackQuery):
async def imdb_search_id(kueri, message): async def imdb_search_id(kueri, message):
BTN = [] BTN = []
k = await message.reply_photo( k = await message.reply_photo(
"https://telegraph.yasirweb.eu.org/file/270955ef0d1a8a16831a9.jpg", "https://img.yasirweb.eu.org/file/270955ef0d1a8a16831a9.jpg",
caption=f"🔎 Menelusuri <code>{kueri}</code> di database IMDb ...", caption=f"🔎 Menelusuri <code>{kueri}</code> di database IMDb ...",
quote=True, quote=True,
) )
@ -186,7 +186,7 @@ async def imdb_search_id(kueri, message):
async def imdb_search_en(kueri, message): async def imdb_search_en(kueri, message):
BTN = [] BTN = []
k = await message.reply_photo( k = await message.reply_photo(
"https://telegraph.yasirweb.eu.org/file/270955ef0d1a8a16831a9.jpg", "https://img.yasirweb.eu.org/file/270955ef0d1a8a16831a9.jpg",
caption=f"🔎 Searching <code>{kueri}</code> in IMDb Database...", caption=f"🔎 Searching <code>{kueri}</code> in IMDb Database...",
quote=True, quote=True,
) )

View file

@ -409,7 +409,8 @@ async def inline_menu(self, inline_query: InlineQuery):
for result in item: for result in item:
title = result.get("full_name") title = result.get("full_name")
link = result.get("html_url") link = result.get("html_url")
deskripsi = result.get("description")[:25] if len(result.get("description")) > 25 else result.get("description") desc = result.get("description") if result.get("description") else ""
deskripsi = desc[:100] if len(desc) > 100 else desc
lang = result.get("language") lang = result.get("language")
message_text = f"🔗: {result.get('html_url')}\n\n└─🍴Forks: {result.get('forks')} ┃┃ 🌟Stars: {result.get('stargazers_count')}\n\n" message_text = f"🔗: {result.get('html_url')}\n\n└─🍴Forks: {result.get('forks')} ┃┃ 🌟Stars: {result.get('stargazers_count')}\n\n"
message_text += f"<b>Description:</b> {deskripsi}\n" message_text += f"<b>Description:</b> {deskripsi}\n"

View file

@ -84,10 +84,6 @@ async def current_chat_permissions(chat_id):
except FloodWait as e: except FloodWait as e:
await asyncio.sleep(e.value) await asyncio.sleep(e.value)
perm = (await app.get_chat(chat_id)).permissions perm = (await app.get_chat(chat_id)).permissions
try:
perm.can_send_messages
except:
LOGGER.error(f"Got error in chat: {chat_id}, perm: {perm}") # For debug
if perm.can_send_messages: if perm.can_send_messages:
perms.append("can_send_messages") perms.append("can_send_messages")
if perm.can_send_media_messages: if perm.can_send_media_messages:
@ -182,8 +178,17 @@ async def locks_func(_, message):
chat_id, chat_id,
ChatPermissions( ChatPermissions(
can_send_messages=True, can_send_messages=True,
can_send_plain=True,
can_send_media_messages=True, can_send_media_messages=True,
can_send_other_messages=True, can_send_docs=True,
can_send_inline=True,
can_send_photos=True,
can_send_videos=True,
can_send_roundvideos=True,
can_send_audios=True,
can_send_voices=True,
can_send_stickers=True,
can_send_gifs=True,
can_add_web_page_previews=True, can_add_web_page_previews=True,
can_send_polls=True, can_send_polls=True,
can_change_info=False, can_change_info=False,
@ -210,7 +215,7 @@ async def locktypes(_, message):
await message.reply_text(perms) await message.reply_text(perms)
@app.on_message(filters.text & ~filters.private, group=69) @app.on_message(filters.text & filters.group, group=69)
async def url_detector(_, message): async def url_detector(_, message):
user = message.from_user or message.sender_chat user = message.from_user or message.sender_chat
chat_id = message.chat.id chat_id = message.chat.id

View file

@ -43,7 +43,7 @@ async def ocr(_, ctx: Message, strings):
f"ocr_{ctx.from_user.id if ctx.from_user else ctx.sender_chat.id}.jpg" f"ocr_{ctx.from_user.id if ctx.from_user else ctx.sender_chat.id}.jpg"
) )
response = await Telegraph().upload_file(file_path) response = await Telegraph().upload_file(file_path)
url = f"https://telegraph.yasirweb.eu.org{response[0]['src']}" url = f"https://img.yasirweb.eu.org{response[0]['src']}"
req = ( req = (
await fetch.get( await fetch.get(
f"https://script.google.com/macros/s/AKfycbwURISN0wjazeJTMHTPAtxkrZTWTpsWIef5kxqVGoXqnrzdLdIQIfLO7jsR5OQ5GO16/exec?url={url}", f"https://script.google.com/macros/s/AKfycbwURISN0wjazeJTMHTPAtxkrZTWTpsWIef5kxqVGoXqnrzdLdIQIfLO7jsR5OQ5GO16/exec?url={url}",

View file

@ -74,7 +74,7 @@ async def start(_, ctx: Message, strings):
nama = ctx.from_user.mention if ctx.from_user else ctx.sender_chat.title nama = ctx.from_user.mention if ctx.from_user else ctx.sender_chat.title
try: try:
return await ctx.reply_photo( return await ctx.reply_photo(
photo="https://telegraph.yasirweb.eu.org/file/90e9a448bc2f8b055b762.jpg", photo="https://img.yasirweb.eu.org/file/90e9a448bc2f8b055b762.jpg",
caption=strings("start_msg").format(kamuh=nama), caption=strings("start_msg").format(kamuh=nama),
reply_markup=keyboard, reply_markup=keyboard,
) )
@ -97,7 +97,7 @@ async def start(_, ctx: Message, strings):
) )
else: else:
await ctx.reply_photo( await ctx.reply_photo(
photo="https://telegraph.yasirweb.eu.org/file/90e9a448bc2f8b055b762.jpg", photo="https://img.yasirweb.eu.org/file/90e9a448bc2f8b055b762.jpg",
caption=home_text_pm, caption=home_text_pm,
reply_markup=home_keyboard_pm, reply_markup=home_keyboard_pm,
) )