Skip to content

Commit

Permalink
Update to [Layer 133] and [Other Minor Fixes].
Browse files Browse the repository at this point in the history
Telegram wants all Unofficial Client to instantly change to new layer (on or above 133).

This Commit may Fix-
- Issue with UnsupportedUser64Bot
- minor errors in [listsudo mediainfo] etc.

Co-authored-by: Danish <[email protected]>
  • Loading branch information
New-dev0 and Danish authored Dec 3, 2021
1 parent cd5cf96 commit 95e0eb2
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 24 deletions.
26 changes: 19 additions & 7 deletions .github/ISSUE_TEMPLATE/bug-reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ name: Bug Report
description: File a bug report
title: "[BUG REPORT]"
labels: [bug]
assignees:
- xditya
- New-dev0
- buddhhu
- 1Danish-00
body:
- type: markdown
attributes:
Expand Down Expand Up @@ -35,8 +30,25 @@ body:
label: Version
description: What version of Ultroid are you running?
options:
- 0.0.8 (or later)
- 0.0.7 (or lesser)
- 0.2
- 0.1
- 0.0.9
- 0.0.8 (or lesser)
validations:
required: true
- type: dropdown
id: hosted
attributes:
label: Hosted On
description: You Hosted Ultroid In Which Platform?
options:
- Vps
- Heroku
- Railway
- Qovery
- Termux
- Other
- Didn't Deployed Yet
validations:
required: true
- type: textarea
Expand Down
14 changes: 9 additions & 5 deletions plugins/chat_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,23 +67,27 @@ async def lister(event):

async def chat_bot_fn(event, type_):
if event.reply_to:
user = (await event.get_reply_message()).sender
re_ = await event.get_reply_message()
user = await re_.get_sender()
user_id = re_.sender_id
else:
temp = event.text.split(maxsplit=1)
try:
user = await event.client.get_entity(temp[1])
user_id = user.id
except BaseException:
if event.is_private:
user = event.chat
user_id = event.chat_id
user = await event.get_chat()
else:
return await eod(
event,
get_string("chab_1"),
)
if type_ == "add":
add_chatbot(event.chat_id, user.id)
add_chatbot(event.chat_id, user_id)
if type_ == "remov":
rem_chatbot(event.chat_id, user.id)
rem_chatbot(event.chat_id, user_id)
await eor(
event, f"**ChatBot:**\n{type_}ed [{user.first_name}](tg://user?id={user.id})"
event, f"**ChatBot:**\n{type_}ed {inline_mention(user)}"
)
8 changes: 6 additions & 2 deletions plugins/mediatools.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,13 @@ async def mi(e):
naam = await r.download_media()
out, er = await bash(f"mediainfo '{naam}' --Output=HTML")
if er:
LOGS.info(er)
LOGS.exception(er)
return await ee.edit(f"**[{xx}]({url})**", link_preview=False)
urll = make_html_telegraph("Mediainfo", "Ultroid", out)
try:
urll = make_html_telegraph("Mediainfo", "Ultroid", out)
except Exception as er:
LOGS.exception(er)
return await ee.edit(f"**ERROR :** `{er}`")
await ee.edit(
f"**[{xx}]({url})**\n\n[{get_string('mdi_1')}]({urll})", link_preview=False
)
Expand Down
2 changes: 1 addition & 1 deletion plugins/sudo.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"""
from pyUltroid.dB.sudos import add_sudo, del_sudo, is_sudo

from . import Redis, eor, get_display_name, get_user_id, udB, ultroid_bot, ultroid_cmd
from . import Redis, eor, get_string, get_display_name, get_user_id, udB, ultroid_bot, ultroid_cmd


@ultroid_cmd(pattern="addsudo ?(.*)", fullsudo=True)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Important Requirements here.

https://github.com/New-dev0/Telethon/archive/Tarzan.zip
https://github.com/New-dev0/Telethon/archive/Branch.zip
py-Ultroid==2021.10.11.1
pytgcalls==3.0.0.dev19
14 changes: 6 additions & 8 deletions resources/session/ssgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def spinner():
for frame in r"-\|/-\|/":
print("\b", frame, sep="", end="", flush=True)
sleep(0.1)
import telethon


def clear_screen():
Expand Down Expand Up @@ -54,7 +55,7 @@ def telethon_session():
spinner()

x = "\bFound an existing installation of Telethon...\nSuccessfully Imported.\n\n"
except BaseException:
except ImportError:
print("Installing Telethon...")
os.system("pip install -U telethon")

Expand Down Expand Up @@ -82,26 +83,23 @@ def telethon_session():
print(
"Your SESSION has been generated. Check your telegram saved messages!"
)
exit(0)
except ApiIdInvalidError:
print(
"Your API ID/API HASH combination is invalid. Kindly recheck.\nQuitting..."
)
exit(0)
except ValueError:
print("API HASH must not be empty!\nQuitting...")
exit(0)
except PhoneNumberInvalidError:
print("The phone number is invalid!\nQuitting...")
exit(0)

except Exception as er:
print(er)

def main():
clear_screen()
print(a)
telethon_session()
x = input("Run again? (y/n")
if x == "y":
x = input("Run again? (y/n)")
if x.lower() == "y":
main()
else:
exit(0)
Expand Down

5 comments on commit 95e0eb2

@iAkashPattnaik
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I told you guys to atleast give me a heads up before a new update to main branch!!

@ogsamrat
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I told you guys to atleast give me a heads up before a new update to main branch!!

Nobody cares

@iAkashPattnaik
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I told you guys to atleast give me a heads up before a new update to main branch!!

Nobody cares

Who tf are you?

@ogsamrat
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I told you guys to atleast give me a heads up before a new update to main branch!!

Nobody cares

Who tf are you?

Your dad

@4everland
Copy link

@4everland 4everland bot commented on 95e0eb2 Dec 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.