Skip to content

Commit

Permalink
warns: allow_sending_without_reply=True on warn
Browse files Browse the repository at this point in the history
  • Loading branch information
itsLuuke committed May 7, 2023
1 parent c887216 commit c82221f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions AstrakoBot/modules/systools.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ def status(update: Update, context: CallbackContext):
uname = platform.uname()
msg += "*System information*\n"
msg += f"OS: `{uname.system}`\n"
msg += f"Version: `{uname.version}`\n"
msg += f"Version: `{uname.version.split(" ")[0]}`\n"
msg += f"Release: `{uname.release}`\n"
msg += f"Processor: `{uname.processor}`\n"
boot_time_timestamp = psutil.boot_time()
bt = datetime.fromtimestamp(boot_time_timestamp)
msg += f"Boot time: `{bt.day}/{bt.month}/{bt.year} - {bt.hour}:{bt.minute}:{bt.second}`\n"
msg += f"CPU cores: `{psutil.cpu_count(logical=False)} physical, {psutil.cpu_count()} logical`\n"
msg += f"CPU freq: `{psutil.cpu_freq().current:.2f}Mhz`\n"
msg += f"CPU freq: `{psutil.cpu_freq().current:.2f}Mhz`\n" if psutil.cpu_freq() else ""
msg += f"CPU usage: `{psutil.cpu_percent()}%`\n"
ram = psutil.virtual_memory()
msg += f"RAM: `{get_size(ram.total)} - {get_size(ram.used)} used ({ram.percent}%)`\n"
Expand Down
2 changes: 1 addition & 1 deletion AstrakoBot/modules/warns.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def warn(
)

try:
message.reply_text(reply, reply_markup=keyboard, parse_mode=ParseMode.HTML)
message.reply_text(reply, reply_markup=keyboard, parse_mode=ParseMode.HTML, allow_sending_without_reply=True)
except BadRequest as excp:
if excp.message == "Reply message not found":
# Do not reply
Expand Down

0 comments on commit c82221f

Please sign in to comment.