mirror of https://github.com/coddrago/Heroku
Bugfixes
commit
02122c5860
|
@ -1,7 +1,6 @@
|
|||
# Heroku Changelog
|
||||
## 🪐 Heroku 1.7.0
|
||||
|
||||
- First sex with a designer
|
||||
- added banner to ping
|
||||
- added config for emoji in config (.cfg herokuconfig)
|
||||
- fixed close button in .update
|
||||
|
@ -21,7 +20,7 @@
|
|||
- fix close btn
|
||||
- fix native imports
|
||||
- added converting Hikka backups to Heroku
|
||||
- updatet to aiogram 3.20.0
|
||||
- updated to aiogram 3.20.0
|
||||
- fix some bugs with buttons in inline
|
||||
|
||||
## 🪐 Heroku 1.6.8
|
||||
|
|
|
@ -556,7 +556,7 @@ translate:
|
|||
_cmd_doc_tr: "[Sprache] [Text] - Übersetzt den Text"
|
||||
|
||||
quickstart:
|
||||
base: "🪐 <b>Hallo.</b> Ihr <b>Heroku</b>-Userbot ist jetzt installiert.\n\n❓ <b>Benötigen Sie Hilfe?</b> Nehmen Sie an <a href=\"https://t.me/heroku_talks\">unserem Support-Chat</a> teil. Wir helfen <b>jedem</b>.\n\n💁♀️ <b>Kurzanleitung:</b>\n\n1️⃣ <b>Schreiben Sie</b> <code>.help</code>, <b>um die Liste der Module anzuzeigen</b>\n2️⃣ <b>Schreiben Sie</b> <code>.help <Modulname/Befehl></code>, <b>um die Beschreibung des Moduls anzuzeigen</b>\n3️⃣ <b>Schreiben Sie</b> <code>.dlmod <link></code> <b>um ein Modul von einem Link zu laden</b>\n4️⃣ <b>Schreiben</b> <code>.loadmod</code> <b>als Antwort auf eine Datei, um ein Modul daraus zu laden</b>\n5️⃣ <b>Schreiben</b> <code>.unloadmod <Modulname></code> <b>um ein Modul zu entladen</b>\n\n💡 <b>Heroku unterstützt Module von Heroku, Friendly-Telegram und GeekTG sowie seine eigenen.</b>\n"
|
||||
base: "🪐 <b>Hallo.</b> Ihr <b>Heroku</b>-Userbot ist jetzt installiert.\n\n❓ <b>Benötigen Sie Hilfe?</b> Nehmen Sie an <a href=\"https://t.me/heroku_talks\">unserem Support-Chat</a> teil. Wir helfen <b>jedem</b>.\n\n💁♀️ <b>Kurzanleitung:</b>\n\n1️⃣ <b>Schreiben Sie</b> <code>.help</code>, <b>um die Liste der Module anzuzeigen</b>\n2️⃣ <b>Schreiben Sie</b> <code>.help <Modulname/Befehl></code>, <b>um die Beschreibung des Moduls anzuzeigen</b>\n3️⃣ <b>Schreiben Sie</b> <code>.dlmod <link></code> <b>um ein Modul von einem Link zu laden</b>\n4️⃣ <b>Schreiben</b> <code>.loadmod</code> <b>als Antwort auf eine Datei, um ein Modul daraus zu laden</b>\n5️⃣ <b>Schreiben</b> <code>.unloadmod <Modulname<</code> <b>um ein Modul zu entladen</b>\n\n💡 <b>Heroku unterstützt Module von Heroku, Friendly-Telegram und GeekTG sowie seine eigenen.</b>\n"
|
||||
railway: "🚂 <b>Dein Userbot ist auf Railway installiert</b>. Auf dieser Plattform erhältst du nur <b>500 kostenlose Stunden pro Monat</b>. Wenn das Limit erreicht ist, wird dein <b>Userbot eingefroren</b>. Im nächsten Monat <b>musst du zu https://railway.app gehen und ihn neu starten</b>."
|
||||
lavhost: "✌️ <b>Dein Userbot ist auf lavHost installiert</b>. Trete @lavhost bei, um wichtige Benachrichtigungen und Updates zu erhalten. Alle Fragen zur Plattform sollten in @lavhostchat gestellt werden."
|
||||
language_saved: "🇩🇪 Sprache gespeichert!"
|
||||
|
|
|
@ -594,7 +594,7 @@ translate:
|
|||
|
||||
quickstart:
|
||||
name: "Quickstart"
|
||||
base: "🪐 <b>Hello.</b> Your <b>Heroku</b> userbot is now installed.\n\n❓ <b>Need help?</b> Join <a href=\"https://t.me/heroku_talks\">our support chat</a>. We help <b>everyone</b>.\n\n💁♀️ <b>Quick Guide:</b>\n\n1️⃣ <b>Write</b> <code>.help</code> <b>to see the list of modules</b>\n2️⃣ <b>Write</b> <code>.help <Module name/command></code> <b>to see the description of the module</b>\n3️⃣ <b>Write</b> <code>.dlmod <link></code> <b>to load a module from a link</b>\n4️⃣ <b>Write</b> <code>.loadmod</code> <b>in response to a file to load a module from it</b>\n5️⃣ <b>Write</b> <code>.unloadmod <Module name></code> <b>to unload a module</b>\n\n💡 <b>Heroku supports modules from Heroku, Friendly-Telegram, and GeekTG, as well as its own.</b>\n"
|
||||
base: "🪐 <b>Hello.</b> Your <b>Heroku</b> userbot is now installed.\n\n❓ <b>Need help?</b> Join <a href=\"https://t.me/heroku_talks\">our support chat</a>. We help <b>everyone</b>.\n\n💁♀️ <b>Quick Guide:</b>\n\n1️⃣ <b>Write</b> <code>.help</code> <b>to see the list of modules</b>\n2️⃣ <b>Write</b> <code>.help <Module name/command></code> <b>to see the description of the module</b>\n3️⃣ <b>Write</b> <code>.dlmod <link></code> <b>to load a module from a link</b>\n4️⃣ <b>Write</b> <code>.loadmod</code> <b>in response to a file to load a module from it</b>\n5️⃣ <b>Write</b> <code>.unloadmod <Module name></code> <b>to unload a module</b>\n\n💡 <b>Heroku supports modules from Heroku, Friendly-Telegram, and GeekTG, as well as its own.</b>\n"
|
||||
lavhost: "✌️ <b>Your userbot is installed on lavHost</b>. Make sure to join @lavhost for important notifications and updates. All questions regarding the platform should be asked in @lavhostchat."
|
||||
language_saved: "🇬🇧 Language saved!"
|
||||
language: "🇬🇧 English"
|
||||
|
|
|
@ -558,7 +558,7 @@ translate:
|
|||
_cmd_doc_tr: "[мова] [текст] - Перекласти текст"
|
||||
|
||||
quickstart:
|
||||
base: "🪐 <b>Привет.</b> Твой юзербот <b>Heroku</b> установлен.\n\n❓ <b>Нужна помощь?</b> Вступай <a href=\"https://t.me/heroku_talks\">в наш чат поддержки</a>. Мы помогаем <b>всем</b>.\n\n💁♀️ <b>Быстрый гайд:</b>\n\n1️⃣ <b>Напиши</b> <code>.help</code> <b>чтобы увидеть список модулей</b>\n2️⃣ <b>Напиши</b> <code>.help <Название модуля/команда></code> <b>чтобы увидеть описание модуля</b>\n3️⃣ <b>Напиши</b> <code>.dlmod <посилання></code> <b>щоб завантажити модуль із посилання</b>\n4️⃣ <b>Напиши</b> <code>.loadmod</code> <b>відповіддю на файл, щоб завантажити модуль з нього</b>\n5️⃣ <b>Напиши</b> <code>.unloadmod <n> 💡 <b>Heroku підтримує модулі з Heroku, Friendly-Telegram та GeekTG, а також свої власні.</b>\n"
|
||||
base: "🪐 <b>Привет.</b> Твой юзербот <b>Heroku</b> установлен.\n\n❓ <b>Нужна помощь?</b> Вступай <a href=\"https://t.me/heroku_talks\">в наш чат поддержки</a>. Мы помогаем <b>всем</b>.\n\n💁♀️ <b>Быстрый гайд:</b>\n\n1️⃣ <b>Напиши</b> <code>.help</code> <b>чтобы увидеть список модулей</b>\n2️⃣ <b>Напиши</b> <code>.help <Название модуля/команда></code> <b>чтобы увидеть описание модуля</b>\n3️⃣ <b>Напиши</b> <code>.dlmod <посилання></code> <b>щоб завантажити модуль із посилання</b>\n4️⃣ <b>Напиши</b> <code>.loadmod</code> <b>відповіддю на файл, щоб завантажити модуль з нього</b>\n5️⃣ <b>Напиши</b> <code>.unloadmod <Назва модуля> </code> <b>, щоб вивантажити модуль</b> \n\n💡 <b>Heroku підтримує модулі з Heroku, Friendly-Telegram та GeekTG, а також свої власні.</b>\n"
|
||||
railway: "🚂 <b>Ти встановив юзербота на Railway, вітаю!</b>. На цій платформі ти отримуєш лише <b>500 безкоштовних годин на місяць</b>. Коли ліміт буде досягнуто, твій <b>юзербот буде заморожено</b>. Наступного місяця <b>ти повинен будеш перейти на https://railway.app і перезапустити його</b>."
|
||||
lavhost: "✌️ <b>Ти встановив юзербота на LavHost, вітаю!</b>. Усі новини про хост - @lavhost. Усі питання про хост - @lavhostchat"
|
||||
language_saved: "🇺🇦 Мова збережена!"
|
||||
|
|
|
@ -527,6 +527,12 @@ rotating_handler.setFormatter(_main_formatter)
|
|||
|
||||
|
||||
def init():
|
||||
class NoFetchUpdatesFilter(logging.Filter):
|
||||
def filter(self, record: logging.LogRecord) -> bool:
|
||||
msg = record.getMessage()
|
||||
return "Failed to fetch updates" not in msg
|
||||
|
||||
logging.getLogger("aiogram.dispatcher").addFilter(NoFetchUpdatesFilter())
|
||||
handler = logging.StreamHandler()
|
||||
handler.setLevel(logging.INFO)
|
||||
handler.setFormatter(_main_formatter)
|
||||
|
|
|
@ -972,34 +972,24 @@ class Heroku:
|
|||
|
||||
await asyncio.gather(*[self.amain_wrapper(client) for client in self.clients])
|
||||
|
||||
async def _shutdown_handler(self, final: bool = False):
|
||||
if not final:
|
||||
logging.info("Ctrl + C....... Bye?")
|
||||
for client in self.clients:
|
||||
inline = getattr(client.loader, "inline", None)
|
||||
if inline:
|
||||
for t in (inline._task, inline._cleaner_task):
|
||||
if t:
|
||||
t.cancel()
|
||||
async def _shutdown_handler(self):
|
||||
for client in self.clients:
|
||||
inline = getattr(client.loader, "inline", None)
|
||||
if inline:
|
||||
for t in (inline._task, inline._cleaner_task):
|
||||
if t:
|
||||
t.cancel()
|
||||
try:
|
||||
await inline._dp.stop_polling()
|
||||
await inline.bot.session.close()
|
||||
for c in self.clients:
|
||||
await c.disconnect()
|
||||
logging.info("Bye!")
|
||||
else:
|
||||
for client in self.clients:
|
||||
inline = getattr(client.loader, "inline", None)
|
||||
if inline:
|
||||
inline._task.cancel()
|
||||
inline._cleaner_task.cancel()
|
||||
try:
|
||||
await inline._dp.stop_polling()
|
||||
except: pass
|
||||
try:
|
||||
await inline.bot.session.close()
|
||||
except: pass
|
||||
for c in self.clients:
|
||||
await c.disconnect()
|
||||
except: pass
|
||||
for c in self.clients:
|
||||
await c.disconnect()
|
||||
for task in asyncio.all_tasks():
|
||||
if task is not asyncio.current_task():
|
||||
task.cancel()
|
||||
logging.info("Bye!")
|
||||
self.loop.stop()
|
||||
|
||||
def main(self):
|
||||
"""Main entrypoint"""
|
||||
|
@ -1009,8 +999,10 @@ class Heroku:
|
|||
)
|
||||
try:
|
||||
self.loop.run_until_complete(self._main())
|
||||
except:
|
||||
pass
|
||||
finally:
|
||||
self.loop.run_until_complete(self._shutdown_handler(True))
|
||||
self.loop.run_until_complete(self._shutdown_handler())
|
||||
|
||||
|
||||
herokutl.extensions.html.CUSTOM_EMOJIS = not get_config_key("disable_custom_emojis")
|
||||
|
|
|
@ -80,7 +80,7 @@ class HerokuBackupMod(loader.Module):
|
|||
async def _set_backup_period(self, call: BotInlineCall, value: int):
|
||||
if not value:
|
||||
self.set("period", "disabled")
|
||||
await call.answer(self.strings("never"), show_alert=True)
|
||||
await self.inline.bot(call.answer(self.strings("never"), show_alert=True))
|
||||
await call.delete()
|
||||
return
|
||||
|
||||
|
|
|
@ -45,10 +45,10 @@ PRESETS = {
|
|||
"https://github.com/amm1edev/ame_repo/raw/refs/heads/main/Complements.py",
|
||||
"https://github.com/amm1edev/ame_repo/raw/refs/heads/main/Compliments.py",
|
||||
"https://github.com/amm1edev/ame_repo/raw/refs/heads/main/mazemod.py",
|
||||
"https://mods.codrago.top/dice.py",
|
||||
"https://mods.codrago.top/loli.py",
|
||||
"https://mods.codrago.top/DoxTool.py",
|
||||
"https://mods.codrago.top/randomizer.py",
|
||||
"https://mods.codrago.life/dice.py",
|
||||
"https://mods.codrago.life/loli.py",
|
||||
"https://mods.codrago.life/DoxTool.py",
|
||||
"https://mods.codrago.life/randomizer.py",
|
||||
],
|
||||
"chat": [
|
||||
"https://github.com/amm1edev/ame_repo/raw/refs/heads/main/activists.py",
|
||||
|
@ -62,8 +62,8 @@ PRESETS = {
|
|||
"https://github.com/amm1edev/ame_repo/raw/refs/heads/main/BanMedia.py",
|
||||
"https://github.com/amm1edev/ame_repo/raw/refs/heads/main/swmute.py",
|
||||
"https://github.com/amm1edev/ame_repo/raw/refs/heads/main/filter.py",
|
||||
"https://mods.codrago.top/id.py",
|
||||
"https://mods.codrago.top/clickon.py",
|
||||
"https://mods.codrago.life/id.py",
|
||||
"https://mods.codrago.life/clickon.py",
|
||||
],
|
||||
"service": [
|
||||
"https://github.com/amm1edev/ame_repo/raw/refs/heads/main/account_switcher.py",
|
||||
|
@ -78,7 +78,7 @@ PRESETS = {
|
|||
"https://github.com/amm1edev/ame_repo/raw/refs/heads/main/accounttime.py",
|
||||
"https://github.com/amm1edev/ame_repo/raw/refs/heads/main/searx.py",
|
||||
"https://github.com/amm1edev/ame_repo/raw/refs/heads/main/swmute.py",
|
||||
"https://mods.codrago.top/modlist.py",
|
||||
"https://mods.codrago.life/modlist.py",
|
||||
],
|
||||
"downloaders": [
|
||||
"https://heta.dan.tatar/musicdl.py",
|
||||
|
|
|
@ -93,5 +93,5 @@ class Quickstart(loader.Module):
|
|||
self._db.set(translations.__name__, "lang", lang)
|
||||
await self.allmodules.reload_translations()
|
||||
|
||||
await call.answer(self.strings("language_saved"))
|
||||
await self.inline.bot(call.answer(self.strings("language_saved")))
|
||||
await call.edit(text=self.text(), reply_markup=self.mark())
|
||||
|
|
|
@ -422,13 +422,13 @@ class UpdaterMod(loader.Module):
|
|||
async def _add_folder(self):
|
||||
folders = await self._client(GetDialogFiltersRequest())
|
||||
|
||||
if any(getattr(folder, "title", None) == "heroku" for folder in folders):
|
||||
if any(getattr(folder, "title", None) == "heroku" for folder in folders.filters):
|
||||
return
|
||||
|
||||
try:
|
||||
folder_id = (
|
||||
max(
|
||||
(folder for folder in folders if hasattr(folder, "id")),
|
||||
(folder for folder in folders.filters if hasattr(folder, "id")),
|
||||
key=lambda x: x.id,
|
||||
).id
|
||||
+ 1
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
Pillow
|
||||
requests
|
||||
emoji
|
||||
moviepy
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
heroku-tl-new==1.0.8
|
||||
pycloudflared==0.2.0
|
||||
Pillow
|
||||
|
||||
# Python 3.9+
|
Loading…
Reference in New Issue