diff --git a/assets/heroku-update.png b/assets/heroku-update.png deleted file mode 100644 index d330ea6..0000000 Binary files a/assets/heroku-update.png and /dev/null differ diff --git a/assets/unit_alpha.png b/assets/unit_alpha.png deleted file mode 100644 index 2c845b4..0000000 Binary files a/assets/unit_alpha.png and /dev/null differ diff --git a/heroku/modules/heroku_backup.py b/heroku/modules/heroku_backup.py index 70afe2b..0a2406f 100644 --- a/heroku/modules/heroku_backup.py +++ b/heroku/modules/heroku_backup.py @@ -40,7 +40,7 @@ class HerokuBackupMod(loader.Module): if not self.get("period"): await self.inline.bot.send_photo( self.tg_id, - photo="https://imgur.com/a/wfiqkDa.png", + photo="https://raw.githubusercontent.com/coddrago/assets/refs/heads/main/heroku/unit_alpha.png", caption=self.strings("period"), reply_markup=self.inline.generate_markup( utils.chunks( diff --git a/heroku/modules/heroku_info.py b/heroku/modules/heroku_info.py index baa4181..e783d97 100644 --- a/heroku/modules/heroku_info.py +++ b/heroku/modules/heroku_info.py @@ -94,7 +94,7 @@ class HerokuInfoMod(loader.Module): clean_text = ''.join([str for str in text if not any(i in str for i in emoji_list)]) return clean_text - def imgurpidor(self, url: str) -> str: + def imgur(self, url: str) -> str: page = requests.get(url, stream=True, headers={"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"}) soup = BeautifulSoup(page.text, 'html.parser') metatag = soup.find("meta", property="og:image") @@ -200,7 +200,7 @@ class HerokuInfoMod(loader.Module): imgform = self.config['banner_url'].split('.')[-1] imgset = self.config['imgSettings'] if imgform in ['jpg', 'jpeg', 'png', 'bmp', 'webp']: - response = requests.get(self.config['banner_url'] if not self.config['banner_url'].startswith('https://imgur') else self.imgurpidor(self.config['banner_url']), stream=True, headers={"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"}) + response = requests.get(self.config['banner_url'] if not self.config['banner_url'].startswith('https://imgur') else self.imgur(self.config['banner_url']), stream=True, headers={"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"}) img = Image.open(BytesIO(response.content)) font = ImageFont.truetype( glob.glob(f'{os.getcwd()}/assets/font.*')[0], diff --git a/heroku/modules/heroku_web.py b/heroku/modules/heroku_web.py index 58a72c0..7c65478 100644 --- a/heroku/modules/heroku_web.py +++ b/heroku/modules/heroku_web.py @@ -68,7 +68,7 @@ class HerokuWebMod(loader.Module): }, {"text": self.strings("btn_no"), "action": "close"}, ], - photo="https://imgur.com/a/NumfPGa.png", + photo="https://raw.githubusercontent.com/coddrago/assets/refs/heads/main/heroku/web_interface.png", ): raise Exception except Exception: @@ -102,7 +102,7 @@ class HerokuWebMod(loader.Module): self.strings("opening_tunnel"), reply_markup={"text": "🕔 Wait...", "data": "empty"}, photo=( - "https://imgur.com/a/MQJGI0w.png" + "https://raw.githubusercontent.com/coddrago/assets/refs/heads/main/heroku/opening_tunnel.png" ), ) else: @@ -111,7 +111,7 @@ class HerokuWebMod(loader.Module): message=message, reply_markup={"text": "🕔 Wait...", "data": "empty"}, photo=( - "https://imgur.com/a/MQJGI0w.png" + "https://raw.githubusercontent.com/coddrago/assets/refs/heads/main/heroku/opening_tunnel.png" ), ) @@ -120,5 +120,5 @@ class HerokuWebMod(loader.Module): await form.edit( self.strings("tunnel_opened"), reply_markup={"text": self.strings("web_btn"), "url": url}, - photo="https://imgur.com/a/lgmzCpj.png", + photo="https://raw.githubusercontent.com/coddrago/assets/refs/heads/main/heroku/tunnel_opened.png", ) diff --git a/heroku/modules/inline_stuff.py b/heroku/modules/inline_stuff.py index 78048de..4b7474d 100644 --- a/heroku/modules/inline_stuff.py +++ b/heroku/modules/inline_stuff.py @@ -129,6 +129,6 @@ class InlineStuff(loader.Module): return await message.answer_photo( - "https://imgur.com/a/0gmlFYI.png", + "https://raw.githubusercontent.com/coddrago/assets/refs/heads/main/heroku/start_cmd.png", caption=self.strings("this_is_heroku"), ) diff --git a/heroku/modules/loader.py b/heroku/modules/loader.py index 90b8e34..dfc6c89 100644 --- a/heroku/modules/loader.py +++ b/heroku/modules/loader.py @@ -484,7 +484,7 @@ class LoaderMod(loader.Module): "💫 Joined {utils.escape_html(channel.title)}' ), - photo="https://imgur.com/a/XpwmHo6.png", + photo="https://raw.githubusercontent.com/coddrago/assets/refs/heads/main/heroku/joined_jr.png", ) async def load_module( diff --git a/heroku/modules/presets.py b/heroku/modules/presets.py index bf07523..d97742c 100644 --- a/heroku/modules/presets.py +++ b/heroku/modules/presets.py @@ -123,7 +123,7 @@ class Presets(loader.Module): async def _menu(self): await self.inline.bot.send_photo( self._client.tg_id, - 'https://imgur.com/a/7xwuOEt.png', + 'https://raw.githubusercontent.com/coddrago/assets/refs/heads/main/heroku/presets_cmd.png', caption=self.strings('welcome'), reply_markup=self.inline.generate_markup(self._markup), ) diff --git a/heroku/modules/settings.py b/heroku/modules/settings.py index 8af77fd..1df61bd 100644 --- a/heroku/modules/settings.py +++ b/heroku/modules/settings.py @@ -110,7 +110,7 @@ class CoreMod(loader.Module): async def herokucmd(self, message: Message): await utils.answer_file( message, - "https://imgur.com/a/i0Mq22X.png", + "https://raw.githubusercontent.com/coddrago/assets/refs/heads/main/heroku/heroku_cmd.png", self.strings("heroku").format( ( utils.get_platform_emoji() @@ -319,14 +319,14 @@ class CoreMod(loader.Module): self.strings("choose_installation"), message, reply_markup=self._markup, - photo="https://imgur.com/a/HrrFair.png", + photo="https://raw.githubusercontent.com/coddrago/assets/refs/heads/main/heroku/heroku_installation.png", disable_security=True ) ): await self.client.send_file( message.peer_id, - "https://imgur.com/a/HrrFair.png", + "https://raw.githubusercontent.com/coddrago/assets/refs/heads/main/heroku/heroku_installation.png", caption=self.strings["installation"], reply_to=getattr(message, "reply_to_msg_id", None),) elif "-v" in args: await utils.answer(message, self.strings["vds_install"]) diff --git a/heroku/modules/updater.py b/heroku/modules/updater.py index 3f9eea3..61c7a3b 100644 --- a/heroku/modules/updater.py +++ b/heroku/modules/updater.py @@ -108,7 +108,7 @@ class UpdaterMod(loader.Module): if self._pending not in {utils.get_git_hash(), self._notified}: m = await self.inline.bot.send_photo( self.tg_id, - "https://raw.githubusercontent.com/coddrago/Heroku/refs/heads/master/assets/heroku-update.png", + "https://raw.githubusercontent.com/coddrago/assets/refs/heads/main/heroku/updated.png", caption=self.strings("update_required").format( utils.get_git_hash()[:6], '{}'.format( diff --git a/heroku/types.py b/heroku/types.py index 8b44b7f..2927701 100644 --- a/heroku/types.py +++ b/heroku/types.py @@ -336,7 +336,7 @@ class Module: "✖️ Declined joining {utils.escape_html(channel.title)}' ), - photo="https://imgur.com/a/XpwmHo6.png", + photo="https://imgur.com/a/XpwmHo6.png", #for codrago: edit this ) async def request_join( @@ -388,7 +388,7 @@ class Module: await self.inline.bot.send_photo( self.tg_id, - "https://imgur.com/a/gWKLn7h.png", + "https://raw.githubusercontent.com/coddrago/assets/refs/heads/main/heroku/join_request.png", caption=( self._client.loader.lookup("translations") .strings("requested_join")