some banners changed(not fully)

pull/160/head
Who? 2025-07-01 17:11:29 +00:00
parent 21622a8ecb
commit 046739ac40
11 changed files with 16 additions and 16 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 385 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 MiB

View File

@ -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(

View File

@ -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],

View File

@ -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",
)

View File

@ -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"),
)

View File

@ -484,7 +484,7 @@ class LoaderMod(loader.Module):
"💫 <b>Joined <a"
f' href="https://t.me/{channel.username}">{utils.escape_html(channel.title)}</a></b>'
),
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(

View File

@ -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),
)

View File

@ -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"])

View File

@ -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],
'<a href="https://github.com/coddrago/Heroku/compare/{}...{}">{}</a>'.format(

View File

@ -336,7 +336,7 @@ class Module:
"✖️ <b>Declined joining <a"
f' href="https://t.me/{channel.username}">{utils.escape_html(channel.title)}</a></b>'
),
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")