все окупиться поверь

pull/160/head
Who? 2025-07-10 06:29:47 +00:00
parent a62c12ceaa
commit d044122c17
1 changed files with 26 additions and 2 deletions

View File

@ -138,12 +138,36 @@ class InlineStuff(loader.Module):
if message.from_user.id != self.client.tg_id:
await message.answer("You are not allowed to use this")
else:
await message.answer("Your information about userbot:\n<blockquote>prefix: {prefix}\nRAM: {ram_usage} MB\nCPU: {cpu_usage}\nHosting: {host}</blockquote>\n\nThis Beta!".format(prefix=self.get_prefix(),ram_usage=utils.get_ram_usage(),cpu_usage=utils.get_cpu_usage(),host=utils.get_named_platform()), reply_markup = self.inline.generate_markup(markup_obj=[[{"text": "Restart", "callback": self.restart, "args": (message,)}],[{"text": "Reset prefix", "callback": self.reset_prefix}]]))
await message.answer(
"Your information about userbot:"
"\n<blockquote>prefix: {prefix}"
"\nRAM: {ram_usage} MB"
"\nCPU: {cpu_usage}"
"\nHosting: {host}</blockquote>"
"\n\nThis Beta!".format(prefix=self.get_prefix(),ram_usage=utils.get_ram_usage(),cpu_usage=utils.get_cpu_usage(),host=utils.get_named_platform()),
reply_markup = self.inline.generate_markup(
markup_obj=[
[
{
"text": "Restart",
"callback": self.restart,
"args": (message,)
}
],
[
{
"text": "Reset prefix",
"callback": self.reset_prefix
}
]
]
)
)
async def restart(self, call: InlineCall, message):
await call.edit("just test restarta")
await self.invoke("restart", "-f", message=message, peer=self.inline.bot.id)
async def reset_prefix(self, call: InlineCall):
await call.edit("Prefix reset!")
await query.answer("Prefix reset!")
self.db.set("heroku.main", "command_prefix", ".")