само собой

pull/160/head
Who? 2025-07-10 07:11:07 +00:00
parent d044122c17
commit 22361348c0
6 changed files with 20 additions and 14 deletions

View File

@ -1,5 +1,5 @@
FROM python:3.10 as python-base
FROM python-base as builder-base
FROM python:3.10 AS python-base
FROM python-base AS builder-base
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
@ -45,10 +45,9 @@ RUN mkdir /data/private
RUN git clone https://github.com/coddrago/Heroku /data/Heroku
WORKDIR /data/Heroku
RUN git fetch && git checkout master && git pull
RUN pip install --no-warn-script-location --no-cache-dir -U -r requirements.txt
RUN git reset --hard
EXPOSE 8080
CMD python -m heroku --root
CMD ["python", "-m", "heroku", "--root"]

View File

@ -326,6 +326,9 @@ inline_stuff:
bot_username_occupied: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Dieser Bot-Benutzername ist bereits vergeben</b>"
bot_updated: "<emoji document_id=6318792204118656433>🎉</emoji> <b>Einstellungen gespeichert. Um sie anzuwenden, starte den Userbot neu</b>"
this_is_heroku: "🪐 <b>Hallo! Das ist Heroku — ein leistungsstarker modularer Telegram-Userbot. Du kannst ihn auf deinem Account installieren!</b>\n\n<b>🌍 <a href=\"https://github.com/coddrago/Heroku\">GitHub</a></b>\n<b>👥 <a href=\"https://t.me/heroku_talks\">Support-Chat</a></b>"
profile_cmd: " Grundlegende Userbot-Informationen\n\n<blockquote>• Präfix: {prefix}\n• RAM-Auslastung: {ram_usage} MB\n• CPU-Auslastung: {cpu_usage} %\n• Hosting: {host}<blockquote>"
restart: "🔄 Dein Heroku wird neu gestartet..."
prefix_reset: "🔀 Präfix zurückgesetzt!"
_cmd_doc_ch_heroku_bot: "<Benutzername> - Ändert den Benutzernamen des Inline-Bots"
test:

View File

@ -351,6 +351,9 @@ inline_stuff:
bot_username_occupied: "<emoji document_id=5210952531676504517>🚫</emoji> <b>This username is already occupied</b>"
bot_updated: "<emoji document_id=6318792204118656433>🎉</emoji> <b>Config successfully saved. Restart userbot to apply changes</b>"
this_is_heroku: "🪐 <b>Hi! This is Heroku — powerful modular Telegram userbot. You can install it to your account!</b>\n\n<b>🌍 <a href=\"https://github.com/coddrago/Heroku\">GitHub</a></b>\n<b>👥 <a href=\"https://t.me/heroku_talks\">Support chat</a></b>"
profile_cmd: " Userbot Main Information\n\n<blockquote>• Prefix: {prefix}\n• RAM Usage: {ram_usage} MB\n• CPU Usage: {cpu_usage}%\n• Hosting: {host}<blockquote>"
restart: "🔄 Your Heroku is being restarted.."
prefix_reset: "🔀 Prefix reset!"
_cmd_doc_ch_heroku_bot: "<username> - Change your Heroku inline bot username"
_cls_doc: "Provides support for inline stuff"

View File

@ -326,6 +326,9 @@ inline_stuff:
bot_username_occupied: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Такой ник бота уже занят</b>"
bot_updated: "<emoji document_id=6318792204118656433>🎉</emoji> <b>Настройки сохранены. Для их применения нужно перезагрузить юзербот</b>"
this_is_heroku: "🪐 <b>Привет! Это Heroku — мощный модульный Telegram юзербот. Вы можете установить его на свой аккаунт!</b>\n\n<b>🌍 <a href=\"https://github.com/coddrago/Heroku\">GitHub</a></b>\n<b>👥 <a href=\"https://t.me/heroku_talks\">Чат поддержки</a></b>"
profile_cmd: " Основная информация об юзерботе\n\n<blockquote>• Префикс: {prefix}\n• Использование RAM: {ram_usage} МБ\n• Использование CPU: {cpu_usage}%\n• Хостинг: {host}<blockquote>"
restart: "🔄 Ваша Heroku перезапускается..."
prefix_reset: "🔀 Префикс сброшен!"
_cmd_doc_ch_heroku_bot: "<юзернейм> - Изменить юзернейм инлайн бота"
test:

View File

@ -326,6 +326,9 @@ inline_stuff:
bot_username_occupied: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Такий нік бота вже зайнятий</b>"
bot_updated: "<emoji document_id=6318792204118656433>🎉</emoji> <b>Налаштування збережені. Для їх застосування треба перезавантажити юзербота</b>"
this_is_heroku: "🪐 <b>Привіт! Це Heroku — потужний модульний Telegram юзербот. Ви можете встановити його на свій акаунт!</b>\n\n<b>🌍 <a href=\"https://github.com/coddrago/Heroku\">GitHub</a></b>\n<b>👥 <a href=\"https://t.me/heroku_talks\">Чат підтримки</a></b>"
profile_cmd: " Основна інформація про юзерботу\n\n<blockquote>• Префікс: {prefix}\n• Використання RAM: {ram_usage} МБ\n• Використання CPU: {cpu_usage}%\n• Хостинг: {host}<blockquote>"
restart: "🔄 Ваша Heroku перезапускається..."
prefix_reset: "🔀 Префікс скинутий!"
_cmd_doc_ch_heroku_bot: "<юзернейм> - Змінити юзернейм інлайн бота"
test:

View File

@ -136,15 +136,10 @@ class InlineStuff(loader.Module):
if message.text == "/profile":
if message.from_user.id != self.client.tg_id:
await message.answer("You are not allowed to use this")
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()),
self.strings["profile_cmd"].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=[
[
@ -165,9 +160,9 @@ class InlineStuff(loader.Module):
)
async def restart(self, call: InlineCall, message):
await call.edit("just test restarta")
await call.edit(self.strings["restart"])
await self.invoke("restart", "-f", message=message, peer=self.inline.bot.id)
async def reset_prefix(self, call: InlineCall):
await query.answer("Prefix reset!")
await message.answer(self.strings["prefix_reset"])
self.db.set("heroku.main", "command_prefix", ".")