Skip to content

Commit

Permalink
some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
prono69 committed Sep 19, 2024
1 parent 3fff772 commit 1777ef1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 19 deletions.
14 changes: 7 additions & 7 deletions userbot/plugins/anilist.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ async def anilist(event):


@catub.cat_cmd(
pattern="ianime(?:\s|$)([\s\S]*)",
command=("ianime", plugin_category),
pattern="anime(?:\s|$)([\s\S]*)",
command=("anime", plugin_category),
info={
"header": "search anime.",
"description": "Fetches anime information from anilist",
Expand Down Expand Up @@ -994,12 +994,12 @@ async def manga(event):


@catub.cat_cmd(
pattern="anime ?(.*)",
command=("anime", plugin_category),
pattern="ianime ?(.*)",
command=("ianime", plugin_category),
info={
"header": "Search anime in a noice format.",
"usage": "{tr}anime <anime name>",
"examples": "{tr}anime boku no pico",
"usage": "{tr}ianime <anime name>",
"examples": "{tr}ianime boku no pico",
},
)
async def get_anime(message):
Expand Down Expand Up @@ -1058,7 +1058,7 @@ async def get_anime(message):

# Info for Buttons
mal_dir_link = results_["url"]
trailer_link = results_["trailer_url"]
trailer_link = results_["trailer"]["url"]
if trailer_link:
trailer_link = f"[🎬 Trailer]({trailer_link})"
else:
Expand Down
14 changes: 7 additions & 7 deletions userbot/plugins/corecmds.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,16 +252,16 @@ async def get_the_addons(event):
"t": "Will send the log as text file",
},
"usage": [
"{tr}logs -{flag}",
"{tr}logs -{flag}{flag}",
"{tr}logs {flag}",
"{tr}logs {flag}{flag}",
],
"examples": [
"{tr}logs",
"{tr}logs -f",
"{tr}logs -r",
"{tr}logs -t",
"{tr}logs -ft",
"{tr}logs -fr",
"{tr}logs f",
"{tr}logs r",
"{tr}logs t",
"{tr}logs ft",
"{tr}logs fr",
],
},
)
Expand Down
13 changes: 8 additions & 5 deletions userbot/plugins/evaluators.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,16 +217,19 @@ async def search_func(event):

filepath = inspect.getfile(source)
caption = f"**Source:** `{filepath}`"
with open(filename, "w") as f:
text = inspect.getsource(source)
f.write(text)

text = inspect.getsource(source)

await catevent.delete()
await catub.send_file(
if len(text) > 4096:
with open(filename, "w") as f:
f.write(text)
await catub.send_file(
event.chat_id,
filename,
caption=caption,
allow_cache=False,
reply_to=event.message.reply_to_msg_id,
)
os.remove(filename)
await edit_or_reply(event, f"{caption} \n\n**OUTPUT:**\n`{text}`")

0 comments on commit 1777ef1

Please sign in to comment.