Skip to content

Commit

Permalink
Auto Fixes: Code formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
InukaAsith committed May 2, 2021
1 parent 0fa6076 commit 632772c
Showing 1 changed file with 23 additions and 20 deletions.
43 changes: 23 additions & 20 deletions DaisyX/modules/owner_stuff.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import rapidjson
import requests
from daisyx import devs

from DaisyX import DAISY_VERSION, OPERATORS, bot, dp
from DaisyX.decorator import COMMANDS_ALIASES, REGISTRED_COMMANDS, register
Expand All @@ -33,7 +34,7 @@
from .utils.message import need_args_dec
from .utils.notes import BUTTONS, get_parsed_note_list, send_note, t_unparse_note_item
from .utils.term import chat_term
from daisyx import devs


@register(cmds="allcommands", is_op=True)
async def all_commands_list(message):
Expand Down Expand Up @@ -73,18 +74,19 @@ async def get_bot_ip(message):

@register(cmds="term", is_owner=True)
async def cmd_term(message):
if message.from_user.id in devs:
msg = await message.reply("Running...")
command = str(message.text.split(" ", 1)[1])
text = "<b>Shell:</b>\n"
text += (
"<code>"
+ html.escape(await chat_term(message, command), quote=False)
+ "</code>"
)
await msg.edit_text(text)
else:
pass
if message.from_user.id in devs:
msg = await message.reply("Running...")
command = str(message.text.split(" ", 1)[1])
text = "<b>Shell:</b>\n"
text += (
"<code>"
+ html.escape(await chat_term(message, command), quote=False)
+ "</code>"
)
await msg.edit_text(text)
else:
pass


@register(cmds="leavechat", is_owner=True)
@need_args_dec()
Expand Down Expand Up @@ -231,15 +233,16 @@ async def get_event(message):

@register(cmds="stats", is_op=True)
async def stats(message):
if message.from_user.id in devs:
text = f"<b>Daisy {DAISY_VERSION} stats</b>\n"
if message.from_user.id in devs:
text = f"<b>Daisy {DAISY_VERSION} stats</b>\n"

for module in [m for m in LOADED_MODULES if hasattr(m, "__stats__")]:
text += await module.__stats__()
for module in [m for m in LOADED_MODULES if hasattr(m, "__stats__")]:
text += await module.__stats__()

await message.reply(text)
else:
pass

await message.reply(text)
else:
pass

async def __stats__():
text = ""
Expand Down

0 comments on commit 632772c

Please sign in to comment.