Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
prono69 committed Sep 19, 2024
1 parent 35ba41e commit 3fff772
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cloudscraper
colour
cowpy
countryinfo
catbox-uploader
emoji==1.7.0
fonttools
fake_useragent
Expand Down
16 changes: 8 additions & 8 deletions userbot/plugins/evaluators.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@


@catub.cat_cmd(
pattern="exec(?:\s|$)([\s\S]*)",
command=("exec", plugin_category),
pattern="bash(?:\s|$)([\s\S]*)",
command=("bash", plugin_category),
info={
"header": "To Execute terminal commands in a subprocess.",
"usage": "{tr}exec <command>",
"examples": "{tr}exec cat stringsetup.py",
"usage": "{tr}bash <command>",
"examples": "{tr}bash cat stringsetup.py",
},
)
async def _(event):
Expand All @@ -48,14 +48,14 @@ async def _(event):
curruser = catuser.username or "catuserbot"
uid = os.geteuid()
if uid == 0:
cresult = f"```{curruser}:~#``` ```{cmd}```\n```{result}```"
cresult = f"**{curruser}:~#** \n`{cmd}`\n\n**• OUTPUT:**\n`{result}`"
else:
cresult = f"```{curruser}:~$``` ```{cmd}```\n```{result}```"
await edit_or_reply(
catevent,
text=cresult,
aslink=True,
linktext=f"**• Exec : **\n```{cmd}``` \n\n**• Result : **\n",
linktext=f"**• Exec : **\n`{cmd}` \n\n**• Result : **\n",
)
if BOTLOG:
await event.client.send_message(
Expand Down Expand Up @@ -99,7 +99,7 @@ async def _(event):
sys.stderr = old_stderr
evaluation = exc or stderr or stdout or _parse_eval(value) or "Success"
final_output = (
f"__►__ **Eval : **\n```{cmd}``` \n\n__►__ **Result : **\n```{evaluation}``` \n"
f"__►__ **Eval : **\n`{cmd}` \n\n__►__ **Result : **\n`{evaluation}` \n"
)
if len(final_output) > 4096:
neko = final_output.replace("`", "").replace("**", "").replace("__", "")
Expand All @@ -111,7 +111,7 @@ async def _(event):
force_document=True,
thumb=thumb_image_path,
allow_cache=False,
caption=f"```{cmd}```" if len(cmd) < 998 else None,
caption=f"`{cmd}`" if len(cmd) < 998 else None,
reply_to=reply_to_id,
)
return await catevent.delete()
Expand Down
2 changes: 1 addition & 1 deletion userbot/plugins/vps.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async def reload_codebase():
with open(config, "r") as f:
configs = f.read()
BRANCH = "master"
REPO = "https://github.com/TgCatUB/catuserbot"
REPO = "https://github.com/prono69/pepecat"
for match in re.finditer(
r"(?:(UPSTREAM_REPO|UPSTREAM_REPO_BRANCH)(?:[ = \"\']+(.*[^\"\'\n])))",
configs,
Expand Down
11 changes: 5 additions & 6 deletions userbot/plugins/webupload.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ async def labstack(event):


@catub.cat_cmd(
pattern=r"webupload\s?(.+?)?\s--(fileio|anonfiles|transfer|filebin|anonymousfiles|bayfiles|megaupload|vshare|0x0|ninja|infura)",
command=("webupload", plugin_category),
pattern=r"webup\s?(.+?)?\s--(fileio|anonfiles|transfer|filebin|anonymousfiles|bayfiles|megaupload|vshare|0x0|ninja|infura)",
command=("webup", plugin_category),
info={
"header": "To upload media to some online media sharing platforms.",
"description": "You can upload media to any of the sites mentioned. This helps in sharing links with others.",
Expand All @@ -117,10 +117,10 @@ async def labstack(event):
"infura": "To infura site",
},
"usage": [
"{tr}webupload --option <Reply to media>",
"{tr}webupload path --option",
"{tr}webup --option <Reply to media>",
"{tr}webup path --option",
],
"examples": "{tr}webupload --fileio reply to media file.",
"examples": "{tr}webup --fileio reply to media file.",
},
)
async def _(event):
Expand All @@ -146,7 +146,6 @@ async def _(event):
# Command dictionary for various upload services
CMD_WEB = {
"fileio": 'curl -F "file=@{full_file_path}" https://file.io',
"anonfiles": 'curl -F "file=@{full_file_path}" https://api.anonfiles.com/upload',
"transfer": 'curl --upload-file "{full_file_path}" https://transfer.sh/'
+ os.path.basename(file_name),
"filebin": 'curl -X POST --data-binary "@{full_file_path}" -H "filename: {bare_local_name}" "https://filebin.net"',
Expand Down

0 comments on commit 3fff772

Please sign in to comment.