mirror of https://github.com/coddrago/Heroku
Add changelog command that takes changelog from the CHANGELOG.md file (last major update)
commit
8e49dc79c9
|
@ -385,6 +385,7 @@ update_notifier:
|
|||
latest_disabled: "Notifications about the latest update have been suppressed"
|
||||
update: "🔄 Update"
|
||||
ignore: "🚫 Ignore"
|
||||
changelog: '<emoji document_id=5434144690511290129>📰</emoji> <b>Changelog of the last major update:</b>\n<pre><code class="language-hikka">{}</code></pre>'
|
||||
_cls_doc: "Tracks latest Hikka releases, and notifies you, if update is required"
|
||||
|
||||
updater:
|
||||
|
|
|
@ -367,6 +367,7 @@ update_notifier:
|
|||
latest_disabled: "Уведомления о последнем обновлении были отключены"
|
||||
update: "🔄 Обновить"
|
||||
ignore: "🚫 Игнорировать"
|
||||
changelog: '<emoji document_id=5434144690511290129>📰</emoji> <b>Список изменений последнего крупного обновления:</b>\n<pre><code class="language-hikka">{}</code></pre>'
|
||||
|
||||
updater:
|
||||
source: "<emoji document_id=5456255401194429832>📖</emoji> <b>Исходный код можно прочитать</b> <a href='{}'>здесь</a>"
|
||||
|
|
|
@ -367,6 +367,7 @@ update_notifier:
|
|||
latest_disabled: "Повідомлення про останнє оновлення було вимкнено"
|
||||
update: "🔄 Оновити"
|
||||
ignore: "🚫 Ігнорувати"
|
||||
changelog: '<emoji document_id=5434144690511290129>📰</emoji> <b>Список змін останнього великого оновлення:</b>\n<pre><code class="language-hikka">{}</code></pre>'
|
||||
|
||||
updater:
|
||||
source: "<emoji document_id=5456255401194429832>📖</emoji> <b>Вихідний код можна прочитати</b> <a href='{}'>тут</a>"
|
||||
|
|
|
@ -11,6 +11,7 @@ import git
|
|||
|
||||
from .. import loader, utils, version
|
||||
from ..inline.types import InlineCall
|
||||
from ..types import Message
|
||||
|
||||
|
||||
@loader.tds
|
||||
|
@ -137,3 +138,13 @@ class UpdateNotifier(loader.Module):
|
|||
await call.delete()
|
||||
|
||||
await self.invoke("update", "-f", peer=self.inline.bot_username)
|
||||
|
||||
@loader.command()
|
||||
async def changelog(self, message: Message):
|
||||
"""Shows the changelog of the last major update"""
|
||||
with open('CHANGELOG.md', mode='r', encoding='utf-8') as f:
|
||||
changelog = f.read().split('##')[1].strip()
|
||||
if (await self._client.get_me()).premium:
|
||||
changelog.replace('🌑 Hikka', '<emoji document_id=5192765204898783881>🌘</emoji><emoji document_id=5195311729663286630>🌘</emoji><emoji document_id=5195045669324201904>🌘</emoji>')
|
||||
|
||||
await utils.answer(message, self.strings('changelog').format(changelog))
|
||||
|
|
Loading…
Reference in New Issue