Skip to content

Commit

Permalink
Update Ultroid v0.7.1
Browse files Browse the repository at this point in the history
Co-authored-by: Amit Sharma <[email protected]>
Co-authored-by: Aditya <[email protected]>
Co-authored-by: ᴀɴᴏɴʏᴍᴏᴜs <[email protected]>
  • Loading branch information
4 people authored Oct 2, 2022
1 parent adcb304 commit 0671f37
Show file tree
Hide file tree
Showing 19 changed files with 160 additions and 421 deletions.
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"required": false
},
"SESSION": {
"description": "Your session string. Can be added now, or after deploy. (The bot will NOT work without a session string!!)",
"description": "Session String (telethon or pyrogram) for your telegram user account. The userbot will NOT work without a session string!!",
"value": ""
},
"REDIS_URI": {
Expand Down
42 changes: 25 additions & 17 deletions assistant/callbackstuffs.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,8 @@ async def update(eve):
heroku = heroku3.from_key(heroku_api)
heroku_app = None
heroku_applications = heroku.apps()
except BaseException:
except BaseException as er:
LOGS.exception(er)
return await eve.edit("`Wrong HEROKU_API.`")
for app in heroku_applications:
if app.name == app_name:
Expand Down Expand Up @@ -807,14 +808,14 @@ async def media(event):
)
response = await conv.get_response()
try:
themssg = response.message.message
themssg = response.message
if themssg == "/cancel":
return await conv.send_message(
"Operation cancelled!!",
buttons=get_back_button("cbs_alvcstm"),
)
except BaseException:
pass
except BaseException as er:
LOGS.exception(er)
if (
not (response.text).startswith("/")
and response.text != ""
Expand All @@ -829,7 +830,8 @@ async def media(event):
x = upl(media)
url = f"https://graph.org/{x[0]}"
remove(media)
except BaseException:
except BaseException as er:
LOGS.exception(er)
return await conv.send_message(
"Terminated.",
buttons=get_back_button("cbs_alvcstm"),
Expand All @@ -848,7 +850,8 @@ async def dell(event):
return await event.edit(
get_string("clst_5"), buttons=get_back_button("cbs_alabs_vcstm")
)
except BaseException:
except BaseException as er:
LOGS.exception(er)
return await event.edit(
get_string("clst_4"),
buttons=get_back_button("cbs_alabs_vcstm"),
Expand Down Expand Up @@ -944,14 +947,14 @@ async def media(event):
)
response = await conv.get_response()
try:
themssg = response.message.message
themssg = response.message
if themssg == "/cancel":
return await conv.send_message(
"Operation cancelled!!",
buttons=get_back_button("cbs_pmcstm"),
)
except BaseException:
pass
except BaseException as er:
LOGS.exception(er)
media = await event.client.download_media(response, "pmpc")
if (
not (response.text).startswith("/")
Expand All @@ -966,7 +969,8 @@ async def media(event):
x = upl(media)
url = f"https://graph.org/{x[0]}"
remove(media)
except BaseException:
except BaseException as er:
LOGS.exception(er)
return await conv.send_message(
"Terminated.",
buttons=get_back_button("cbs_pmcstm"),
Expand All @@ -985,7 +989,8 @@ async def dell(event):
return await event.edit(
get_string("clst_5"), buttons=get_back_button("cbs_pmcstm")
)
except BaseException:
except BaseException as er:
LOGS.exception(er)
return await event.edit(
get_string("clst_4"),
buttons=[[Button.inline("« Sᴇᴛᴛɪɴɢs", data="setter")]],
Expand All @@ -1010,7 +1015,8 @@ async def apof(event):
"Done! AUTOAPPROVE Stopped!!",
buttons=[[Button.inline("« Bᴀᴄᴋ", data="cbs_apauto")]],
)
except BaseException:
except BaseException as er:
LOGS.exception(er)
return await event.edit(
get_string("clst_4"),
buttons=[[Button.inline("« Sᴇᴛᴛɪɴɢs", data="setter")]],
Expand Down Expand Up @@ -1052,7 +1058,8 @@ async def pmlogof(event):
"Done! PMLOGGER Stopped!!",
buttons=[[Button.inline("« Bᴀᴄᴋ", data="pml")]],
)
except BaseException:
except BaseException as er:
LOGS.exception(er)
return await event.edit(
get_string("clst_4"),
buttons=[[Button.inline("« Sᴇᴛᴛɪɴɢs", data="setter")]],
Expand Down Expand Up @@ -1212,14 +1219,14 @@ async def media(event):
)
response = await conv.get_response()
try:
themssg = response.message.message
themssg = response.message
if themssg == "/cancel":
return await conv.send_message(
"Operation cancelled!!",
buttons=get_back_button("setter"),
)
except BaseException:
pass
except BaseException as er:
LOGS.exception(er)
media = await event.client.download_media(response, "inlpic")
if (
not (response.text).startswith("/")
Expand All @@ -1232,7 +1239,8 @@ async def media(event):
x = upl(media)
url = f"https://graph.org/{x[0]}"
remove(media)
except BaseException:
except BaseException as er:
LOGS.exception(er)
return await conv.send_message(
"Terminated.",
buttons=get_back_button("setter"),
Expand Down
1 change: 1 addition & 0 deletions installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ clone_repo(){
}

install_requirements(){
pip install --upgrade pip
echo -e "\n\nInstalling requirements... "
pip3 install -q --no-cache-dir -r $DIR/requirements.txt
pip3 install -q -r $DIR/resources/startup/optional-requirements.txt
Expand Down
2 changes: 0 additions & 2 deletions plugins/admintools.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
)
async def prmte(ult):
xx = await ult.eor(get_string("com_1"))
await ult.get_chat()
user, rank = await get_uinfo(ult)
rank = rank or "Admin"
FullRight = False
Expand Down Expand Up @@ -87,7 +86,6 @@ async def prmte(ult):
)
async def dmote(ult):
xx = await ult.eor(get_string("com_1"))
await ult.get_chat()
user, rank = await get_uinfo(ult)
if not rank:
rank = "Not Admin"
Expand Down
Loading

0 comments on commit 0671f37

Please sign in to comment.