Add correct prefix in info command when update is required

pull/61/head
Rilliat 2025-01-12 09:46:46 +00:00
parent d586b59206
commit cfb1fafb65
5 changed files with 5 additions and 5 deletions

View File

@ -415,7 +415,7 @@ heroku_info:
description: " Dies wird keine persönlichen Informationen preisgeben" description: " Dies wird keine persönlichen Informationen preisgeben"
_ihandle_doc_info: "Sende Informationen zum Userbot" _ihandle_doc_info: "Sende Informationen zum Userbot"
up-to-date: "<emoji document_id=5370699111492229743>😌</emoji> <b>Aktuelle Version</b>" up-to-date: "<emoji document_id=5370699111492229743>😌</emoji> <b>Aktuelle Version</b>"
update_required: "<emoji document_id=5424728541650494040>😕</emoji> <b>Update erforderlich</b> <code>.update</code>" update_required: "<emoji document_id=5424728541650494040>😕</emoji> <b>Update erforderlich</b> <code>{prefix}update</code>"
_cfg_cst_msg: "Benutzerdefinierter Nachrichtentext in info. Kann Schlüsselwörter {me}, {version}, {build}, {prefix}, {platform}, {upd}, {uptime}, {cpu_usage}, {ram_usage}, {branch} enthalten" _cfg_cst_msg: "Benutzerdefinierter Nachrichtentext in info. Kann Schlüsselwörter {me}, {version}, {build}, {prefix}, {platform}, {upd}, {uptime}, {cpu_usage}, {ram_usage}, {branch} enthalten"
_cfg_cst_btn: "Benutzerdefinierte Schaltfläche in der Nachricht in info. Lasse es leer, um die Schaltfläche zu entfernen" _cfg_cst_btn: "Benutzerdefinierte Schaltfläche in der Nachricht in info. Lasse es leer, um die Schaltfläche zu entfernen"
_cfg_banner: "Link zum Banner-Bild" _cfg_banner: "Link zum Banner-Bild"

View File

@ -438,7 +438,7 @@ heroku_info:
send_info: "Send userbot info" send_info: "Send userbot info"
description: " This will not compromise any sensitive info" description: " This will not compromise any sensitive info"
up-to-date: "<emoji document_id=5370699111492229743>😌</emoji> <b>Up-to-date</b>" up-to-date: "<emoji document_id=5370699111492229743>😌</emoji> <b>Up-to-date</b>"
update_required: "<emoji document_id=5424728541650494040>😕</emoji> <b>Update required</b> <code>.update</code>" update_required: "<emoji document_id=5424728541650494040>😕</emoji> <b>Update required</b> <code>{prefix}update</code>"
setinfo_no_args: "<emoji document_id=5370881342659631698>😢</emoji> <b>You need to specify text to change info to</b>" setinfo_no_args: "<emoji document_id=5370881342659631698>😢</emoji> <b>You need to specify text to change info to</b>"
setinfo_success: "<emoji document_id=5436040291507247633>🎉</emoji> <b>Info changed successfully</b>" setinfo_success: "<emoji document_id=5436040291507247633>🎉</emoji> <b>Info changed successfully</b>"
_cfg_cst_msg: "Custom message for info. May contain {me}, {version}, {build}, {prefix}, {platform}, {upd}, {uptime}, {cpu_usage}, {ram_usage}, {branch} keywords" _cfg_cst_msg: "Custom message for info. May contain {me}, {version}, {build}, {prefix}, {platform}, {upd}, {uptime}, {cpu_usage}, {ram_usage}, {branch} keywords"

View File

@ -406,7 +406,7 @@ heroku_info:
description: " Это не раскроет никакой личной информации" description: " Это не раскроет никакой личной информации"
_ihandle_doc_info: "Отправить информацию о юзерботе" _ihandle_doc_info: "Отправить информацию о юзерботе"
up-to-date: "<emoji document_id=5370699111492229743>😌</emoji> <b>Актуальная версия</b>" up-to-date: "<emoji document_id=5370699111492229743>😌</emoji> <b>Актуальная версия</b>"
update_required: "<emoji document_id=5424728541650494040>😕</emoji> <b>Требуется обновление</b> <code>.update</code>" update_required: "<emoji document_id=5424728541650494040>😕</emoji> <b>Требуется обновление</b> <code>{prefix}update</code>"
_cfg_cst_msg: "Кастомный текст сообщения в info. Может содержать ключевые слова {me}, {version}, {build}, {prefix}, {platform}, {upd}, {uptime}, {cpu_usage}, {ram_usage}, {branch}" _cfg_cst_msg: "Кастомный текст сообщения в info. Может содержать ключевые слова {me}, {version}, {build}, {prefix}, {platform}, {upd}, {uptime}, {cpu_usage}, {ram_usage}, {branch}"
_cfg_cst_btn: "Кастомная кнопка в сообщении в info. Оставь пустым, чтобы убрать кнопку" _cfg_cst_btn: "Кастомная кнопка в сообщении в info. Оставь пустым, чтобы убрать кнопку"
_cfg_banner: "Ссылка на баннер-картинку" _cfg_banner: "Ссылка на баннер-картинку"

View File

@ -415,7 +415,7 @@ heroku_info:
description: " Це не розкриє жодної особистої інформації" description: " Це не розкриє жодної особистої інформації"
_ihandle_doc_info: "Надіслати інформацію про юзербота" _ihandle_doc_info: "Надіслати інформацію про юзербота"
up-to-date: "<emoji document_id=5370699111492229743>😌</emoji> <b>Актуальна версія</b>" up-to-date: "<emoji document_id=5370699111492229743>😌</emoji> <b>Актуальна версія</b>"
update_required: "<emoji document_id=5424728541650494040>😕</emoji> <b>Потрібне оновлення</b> <code>.update</code>" update_required: "<emoji document_id=5424728541650494040>😕</emoji> <b>Потрібне оновлення</b> <code>{prefix}update</code>"
_cfg_cst_msg: "Кастомний текст повідомлення в info. Може містити ключові слова {me}, {version}, {build}, {prefix}, {platform}, {upd}, {uptime}, {cpu_usage}, {ram_usage}, {branch}" _cfg_cst_msg: "Кастомний текст повідомлення в info. Може містити ключові слова {me}, {version}, {build}, {prefix}, {platform}, {upd}, {uptime}, {cpu_usage}, {ram_usage}, {branch}"
_cfg_cst_btn: "Кастомна кнопка в повідомленні в info. Залиш порожнім, щоб прибрати кнопку" _cfg_cst_btn: "Кастомна кнопка в повідомленні в info. Залиш порожнім, щоб прибрати кнопку"
_cfg_banner: "Посилання на банер-картинку" _cfg_banner: "Посилання на банер-картинку"

View File

@ -45,7 +45,7 @@ class HerokuInfoMod(loader.Module):
repo = git.Repo(search_parent_directories=True) repo = git.Repo(search_parent_directories=True)
diff = repo.git.log([f"HEAD..origin/{version.branch}", "--oneline"]) diff = repo.git.log([f"HEAD..origin/{version.branch}", "--oneline"])
upd = ( upd = (
self.strings("update_required") if diff else self.strings("up-to-date") self.strings("update_required").format(prefix=self.get_prefix()) if diff else self.strings("up-to-date")
) )
except Exception: except Exception:
upd = "" upd = ""