mirror of https://github.com/coddrago/Heroku
some banners changed(not fully)
parent
21622a8ecb
commit
046739ac40
Binary file not shown.
Before Width: | Height: | Size: 385 KiB |
Binary file not shown.
Before Width: | Height: | Size: 5.5 MiB |
|
@ -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(
|
||||
|
|
|
@ -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],
|
||||
|
|
|
@ -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",
|
||||
)
|
||||
|
|
|
@ -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"),
|
||||
)
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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),
|
||||
)
|
||||
|
|
|
@ -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"])
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue