Skip to content

Commit 5dce607

Browse files
xdityaToni880rooted-cyber
authored
Update copyright, workflows, and improve formatting consistency (#495)
* chore: update copyright header * chore: update GitHub Actions workflows and Python version requirements * style: format YAML syntax for consistency in stringanalysis workflow * style: improve button labels and text formatting for consistency * Update tools.py (#479) * fix errors in tools * Update .env.sample (#482) --------- Co-authored-by: ᴛᴏɴɪ - ᴇx <103916927+Toni880@users.noreply.github.com> Co-authored-by: Maruf <50019150+rooted-cyber@users.noreply.github.com>
1 parent f0da89a commit 5dce607

9 files changed

Lines changed: 70 additions & 61 deletions

File tree

.env.sample

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
API_ID=
44
API_HASH=
55
SESSION=
6-
REDIS_URI=
7-
REDIS_PASSWORD=
6+
87

98
# [OPTIONAL]
109

10+
REDIS_URI=
11+
REDIS_PASSWORD=
1112
LOG_CHANNEL=
1213
BOT_TOKEN=

assistant/callbackstuffs.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,23 +57,23 @@ def text_to_url(event):
5757
Button.inline("SᴜᴘᴇʀFʙᴀɴ", data="cbs_sfban"),
5858
],
5959
[
60-
Button.inline("Sᴜᴅᴏ Mᴏᴅᴇ", data="sudo"),
61-
Button.inline("Hᴀɴᴅʟᴇʀ", data="hhndlr"),
60+
Button.inline("Sudo Mode", data="sudo"),
61+
Button.inline("Handler", data="hhndlr"),
6262
],
6363
[
64-
Button.inline("Exᴛʀᴀ Pʟᴜɢɪɴs", data="plg"),
65-
Button.inline("Aᴅᴅᴏɴs", data="eaddon"),
64+
Button.inline("Extra Plugins", data="plg"),
65+
Button.inline("Addons", data="eaddon"),
6666
],
6767
[
68-
Button.inline("Eᴍᴏᴊɪ ɪɴ Hᴇʟᴘ", data="emoj"),
69-
Button.inline("Sᴇᴛ ɢDʀɪᴠᴇ", data="gdrive"),
68+
Button.inline("Emoji in Help", data="emoj"),
69+
Button.inline("Set gDrive", data="gdrive"),
7070
],
7171
[
72-
Button.inline("Iɴʟɪɴᴇ Pɪᴄ", data="inli_pic"),
73-
Button.inline("Sᴜᴅᴏ HNDLR", data="shndlr"),
72+
Button.inline("Inline Pic", data="inli_pic"),
73+
Button.inline("Sudo HNDLR", data="shndlr"),
7474
],
75-
[Button.inline("Dᴜᴀʟ Mᴏᴅᴇ", "cbs_oofdm")],
76-
[Button.inline(Bᴀᴄᴋ", data="setter")],
75+
[Button.inline("Dual Mode", "cbs_oofdm")],
76+
[Button.inline(Back", data="setter")],
7777
],
7878
},
7979
"sfban": {

assistant/inlinestuff.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,14 @@ async def _(e):
7373
version = data["version"]
7474
size = humanbytes(data["size"])
7575
release_date = datetime.utcfromtimestamp(data["date"]).strftime("%Y-%m-%d")
76-
text = f"[\xad]({ofox})**OʀᴀɴɢᴇFᴏx Rᴇᴄᴏᴠᴇʀʏ Fᴏʀ**\n\n"
77-
text += f"` Fᴜʟʟ Nᴀᴍᴇ: {fullname}`\n"
78-
text += f"` Cᴏᴅᴇɴᴀᴍᴇ: {codename}`\n"
79-
text += f"` Mᴀɪɴᴛᴀɪɴᴇʀ: {maintainer}`\n"
80-
text += f"` Bᴜɪʟᴅ Tʏᴘᴇ: {release}`\n"
81-
text += f"` Vᴇʀsɪᴏɴ: {version}`\n"
82-
text += f"` Sɪᴢᴇ: {size}`\n"
83-
text += f"` Bᴜɪʟᴅ Dᴀᴛᴇ: {release_date}`"
76+
text = f"[­]({ofox})**OrangeFox Recovery For**\n\n"
77+
text += f"` Full Name: {fullname}`\n"
78+
text += f"` Codename: {codename}`\n"
79+
text += f"` Maintainer: {maintainer}`\n"
80+
text += f"` Build Type: {release}`\n"
81+
text += f"` Version: {version}`\n"
82+
text += f"` Size: {size}`\n"
83+
text += f"` Build Date: {release_date}`"
8484
fox.append(
8585
await e.builder.article(
8686
title=f"{fullname}",
@@ -199,18 +199,18 @@ async def gsearch(q_event):
199199
title=title,
200200
description=desc,
201201
thumb=wb(gugirl, 0, "image/jpeg", []),
202-
text=f"**Gᴏᴏɢʟᴇ Sᴇᴀʀᴄʜ**\n\n**••Tɪᴛʟᴇ••**\n`{title}`\n\n**••Dᴇsᴄʀɪᴘᴛɪᴏɴ••**\n`{desc}`",
202+
text=f"**Google Search**\n\n**• Title •**\n`{title}`\n\n**• Description •**\n`{desc}`",
203203
link_preview=False,
204204
buttons=[
205-
[Button.url("Lɪɴᴋ", url=f"{link}")],
205+
[Button.url("Link", url=f"{link}")],
206206
[
207207
Button.switch_inline(
208-
"Sᴇᴀʀᴄʜ Aɢᴀɪɴ",
208+
"Search Again",
209209
query="go ",
210210
same_peer=True,
211211
),
212212
Button.switch_inline(
213-
"Sʜᴀʀᴇ",
213+
"Share",
214214
query=f"go {match}",
215215
same_peer=False,
216216
),
@@ -302,9 +302,9 @@ async def _(e):
302302
name = z["title"]
303303
desc = unescape(z["summary"])[:300].replace("<br>", "\n") + "..."
304304
dev = z["developer"]["devId"]
305-
text = f"**••Aᴘᴘ Nᴀᴍᴇ••** [{name}]({url})\n"
306-
text += f"**••Dᴇᴠᴇʟᴏᴘᴇʀ••** `{dev}`\n"
307-
text += f"**••Dᴇsᴄʀɪᴘᴛɪᴏɴ••**\n`{desc}`"
305+
text = f"**• App Name •** [{name}]({url})\n"
306+
text += f"**• Developer •** `{dev}`\n"
307+
text += f"**• Description •**\n`{desc}`"
308308
foles.append(
309309
await e.builder.article(
310310
title=name,
@@ -313,10 +313,10 @@ async def _(e):
313313
text=text,
314314
link_preview=True,
315315
buttons=[
316-
[Button.url("Lɪɴᴋ", url=url)],
316+
[Button.url("Link", url=url)],
317317
[
318318
Button.switch_inline(
319-
"Mᴏʀᴇ Aᴘᴘs",
319+
"More Apps",
320320
query="app ",
321321
same_peer=True,
322322
),

assistant/start.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,24 @@
3535

3636
_settings = [
3737
[
38-
Button.inline("API Kᴇʏs", data="cbs_apiset"),
39-
Button.inline("Pᴍ Bᴏᴛ", data="cbs_chatbot"),
38+
Button.inline("API Keys", data="cbs_apiset"),
39+
Button.inline("PM Bot", data="cbs_chatbot"),
4040
],
4141
[
42-
Button.inline("Aʟɪᴠᴇ", data="cbs_alvcstm"),
43-
Button.inline("PᴍPᴇʀᴍɪᴛ", data="cbs_ppmset"),
42+
Button.inline("Alive", data="cbs_alvcstm"),
43+
Button.inline("PMPermit", data="cbs_ppmset"),
4444
],
4545
[
46-
Button.inline("Fᴇᴀᴛᴜʀᴇs", data="cbs_otvars"),
47-
Button.inline("VC Sᴏɴɢ Bᴏᴛ", data="cbs_vcb"),
46+
Button.inline("Features", data="cbs_otvars"),
47+
Button.inline("VC Song Bot", data="cbs_vcb"),
4848
],
49-
[Button.inline(Bᴀᴄᴋ", data="mainmenu")],
49+
[Button.inline(Back", data="mainmenu")],
5050
]
5151

5252
_start = [
5353
[
54-
Button.inline("Lᴀɴɢᴜᴀɢᴇ 🌐", data="lang"),
55-
Button.inline("Sᴇᴛᴛɪɴɢs ⚙️", data="setter"),
54+
Button.inline("Language 🌐", data="lang"),
55+
Button.inline("Settings ⚙️", data="setter"),
5656
],
5757
[
5858
Button.inline("Sᴛᴀᴛs ✨", data="stat"),

plugins/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ async def unload(event):
4343
elif zym in os.listdir("plugins"):
4444
return await event.eor(get_string("core_11"), time=3)
4545
else:
46-
await event.eor(f"**Nᴏ Pʟᴜɢɪɴ Nᴀᴍᴇᴅ** `{shortname}`", time=3)
46+
await event.eor(f"**No Plugin Named** `{shortname}`", time=3)
4747

4848

4949
@ultroid_cmd(
@@ -59,14 +59,14 @@ async def uninstall(event):
5959
if zym in lsd:
6060
try:
6161
un_plug(shortname)
62-
await event.eor(f"**Uɴɪɴsᴛᴀʟʟᴇᴅ** `{shortname}` **Sᴜᴄᴄᴇssғᴜʟʟʏ.**", time=3)
62+
await event.eor(f"**Uninstalled** `{shortname}` **successfully.**", time=3)
6363
os.remove(f"addons/{shortname}.py")
6464
except Exception as ex:
6565
return await event.eor(str(ex))
6666
elif zym in os.listdir("plugins"):
6767
return await event.eor(get_string("core_15"), time=3)
6868
else:
69-
return await event.eor(f"**Nᴏ Pʟᴜɢɪɴ Nᴀᴍᴇᴅ** `{shortname}`", time=3)
69+
return await event.eor(f"**No Plugin Named** `{shortname}`", time=3)
7070

7171

7272
@ultroid_cmd(

plugins/pmpermit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ async def approvepm(apprvpm):
410410
if user.id in DEVLIST:
411411
return await eor(
412412
apprvpm,
413-
"Lol, He is my Developer\nHe is auto Approved",
413+
"This is a developer account.\nAutomatically approved.",
414414
)
415415
if not keym.contains(user.id):
416416
keym.add(user.id)
@@ -461,7 +461,7 @@ async def disapprovepm(e):
461461
if user.id in DEVLIST:
462462
return await eor(
463463
e,
464-
"`Lol, He is my Developer\nHe Can't Be DisApproved.`",
464+
"`This is a developer account.\nCannot be disapproved.`",
465465
)
466466
if keym.contains(user.id):
467467
keym.remove(user.id)

plugins/tools.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@
3333
• `{i}webshot <url>`
3434
Get a screenshot of the webpage.
3535
"""
36+
import asyncio
3637
import glob
3738
import io
3839
import os
40+
import re
3941
import secrets
4042
from asyncio.exceptions import TimeoutError as AsyncTimeout
4143

@@ -53,6 +55,7 @@
5355
except ImportError:
5456
WebShot = None
5557

58+
from telethon import functions, types
5659
from telethon.errors.rpcerrorlist import MessageTooLongError, YouBlockedUserError
5760
from telethon.tl.types import (
5861
ChannelParticipantAdmin,
@@ -73,6 +76,7 @@
7376
download_file,
7477
eor,
7578
get_string,
79+
ultroid_bot,
7680
)
7781
from . import humanbytes as hb
7882
from . import inline_mention, is_url_ok, json_parser, mediainfo, ultroid_cmd
@@ -339,8 +343,12 @@ async def _(e):
339343
def sanga_seperator(sanga_list):
340344
string = "".join(info[info.find("\n") + 1 :] for info in sanga_list)
341345
string = re.sub(r"^$\n", "", string, flags=re.MULTILINE)
342-
name, username = string.split("Usernames**")
343-
name = name.split("Names")[1]
346+
try:
347+
name, username = string.split("Usernames**")
348+
name = name.split("Names")[1]
349+
except ValueError:
350+
name = "No Names Found"
351+
username = "No Usernames Found"
344352
return name, username
345353

346354

@@ -383,8 +391,8 @@ async def sangmata(event):
383391
try:
384392
await conv.send_message(f"{userinfo.id}")
385393
except YouBlockedUserError:
386-
await catub(unblock("SangMata_beta_bot"))
387-
await conv.send_message(f"{userinfo.id}")
394+
return await event.edit("`Please unblock @SangMata_beta_bot and try again`")
395+
# await conv.send_message(f"{userinfo.id}")
388396
responses = []
389397
while True:
390398
try:

plugins/utilities.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -339,19 +339,19 @@ async def _(event):
339339
dc_id = user.photo.dc_id
340340
else:
341341
dc_id = "Need a Profile Picture to check this"
342-
caption = """<b>Exᴛʀᴀᴄᴛᴇᴅ Dᴀᴛᴀ Fʀᴏᴍ Tᴇʟᴇɢʀᴀᴍ's Dᴀᴛᴀʙᴀsᴇ<b>
343-
<b>••Tᴇʟᴇɢʀᴀᴍ ID</b>: <code>{}</code>
344-
<b>••Pᴇʀᴍᴀɴᴇɴᴛ Lɪɴᴋ</b>: <a href='tg://user?id={}'>Click Here</a>
345-
<b>••Fɪʀsᴛ Nᴀᴍᴇ</b>: <code>{}</code>
346-
<b>••Sᴇᴄᴏɴᴅ Nᴀᴍᴇ</b>: <code>{}</code>
347-
<b>••Bɪᴏ</b>: <code>{}</code>
348-
<b>••Dᴄ ID</b>: <code>{}</code>
349-
<b>••Nᴏ. Oғ PғPs</b> : <code>{}</code>
350-
<b>•Is Rᴇsᴛʀɪᴄᴛᴇᴅ</b>: <code>{}</code>
351-
<b>••Vᴇʀɪғɪᴇᴅ</b>: <code>{}</code>
352-
<b>•Is Pʀᴇᴍɪᴜᴍ</b>: <code>{}</code>
353-
<b>•Is A Bᴏᴛ</b>: <code>{}</code>
354-
<b>••Gʀᴏᴜᴘs Iɴ Cᴏᴍᴍᴏɴ</b>: <code>{}</code>
342+
caption = """<b>Extracted Data From Telegram's Database</b>
343+
<b>• Telegram ID</b>: <code>{}</code>
344+
<b>• Permanent Link</b>: <a href='tg://user?id={}'>Click Here</a>
345+
<b>• First Name</b>: <code>{}</code>
346+
<b>• Last Name</b>: <code>{}</code>
347+
<b>• Bio</b>: <code>{}</code>
348+
<b>• DC ID</b>: <code>{}</code>
349+
<b>• Number of Profile Pictures</b>: <code>{}</code>
350+
<b>• Is Restricted</b>: <code>{}</code>
351+
<b>• Verified</b>: <code>{}</code>
352+
<b>• Is Premium</b>: <code>{}</code>
353+
<b>• Is A Bot</b>: <code>{}</code>
354+
<b>• Groups In Common</b>: <code>{}</code>
355355
""".format(
356356
user_id,
357357
user_id,

pyUltroid/startup/funcs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ async def customize():
338338
chat_id = udB.get_key("LOG_CHANNEL")
339339
if asst.me.photo:
340340
return
341-
LOGS.info("Customising Ur Assistant Bot in @BOTFATHER")
341+
LOGS.info("Customising Your Assistant Bot in @BOTFATHER")
342342
UL = f"@{asst.me.username}"
343343
if not ultroid_bot.me.username:
344344
sir = ultroid_bot.me.first_name

0 commit comments

Comments
 (0)