mirror of https://github.com/coddrago/Heroku
1.5.0
- Add full trace locals length limit - Rework full trace locals to hashable converterpull/1/head
parent
e6d7e203e7
commit
3f2cff2a0f
|
@ -29,6 +29,8 @@
|
|||
- Add new code input design
|
||||
- Add new 2fa password input design
|
||||
- Add ability to set custom emojis in `.info` using command `.setinfo`. In order to use it, remove buttons using config
|
||||
- Add full trace locals length limit
|
||||
- Rework full trace locals to hashable converter
|
||||
- Patch internal help module with bugfixes
|
||||
- Clean type-hint mess, document utils and other methods, which were undocumented
|
||||
- Remove redundant non-working code from configurator
|
||||
|
|
14
hikka/log.py
14
hikka/log.py
|
@ -60,23 +60,21 @@ class HikkaException:
|
|||
dictionary = dictionary.copy()
|
||||
for key, value in dictionary.items():
|
||||
if isinstance(value, dict):
|
||||
dictionary[key] = to_hashable(value)
|
||||
else:
|
||||
if (
|
||||
getattr(getattr(value, "__class__", None), "__name__", None)
|
||||
== "Database"
|
||||
):
|
||||
dictionary[key] = "<Database>"
|
||||
|
||||
if isinstance(
|
||||
elif isinstance(
|
||||
value,
|
||||
(telethon.TelegramClient, CustomTelegramClient),
|
||||
):
|
||||
dictionary[key] = f"<{value.__class__.__name__}>"
|
||||
|
||||
dictionary[key] = to_hashable(value)
|
||||
else:
|
||||
try:
|
||||
json.dumps([value])
|
||||
except Exception:
|
||||
elif len(str(value)) > 512:
|
||||
dictionary[key] = f"{str(value)[:512]}..."
|
||||
else:
|
||||
dictionary[key] = str(value)
|
||||
|
||||
return dictionary
|
||||
|
|
|
@ -84,12 +84,6 @@ class PythonMod(loader.Module):
|
|||
)
|
||||
exc = exc.replace(str(self._client.hikka_me.phone), "📵")
|
||||
|
||||
if os.environ.get("DATABASE_URL"):
|
||||
exc = exc.replace(
|
||||
os.environ.get("DATABASE_URL"),
|
||||
"postgre://**************************",
|
||||
)
|
||||
|
||||
if os.environ.get("hikka_session"):
|
||||
exc = exc.replace(
|
||||
os.environ.get("hikka_session"),
|
||||
|
@ -119,11 +113,6 @@ class PythonMod(loader.Module):
|
|||
|
||||
ret = ret.replace(str(self._client.hikka_me.phone), "📵")
|
||||
|
||||
if postgre := os.environ.get("DATABASE_URL") or main.get_config_key(
|
||||
"postgre_uri"
|
||||
):
|
||||
ret = ret.replace(postgre, "postgre://**************************")
|
||||
|
||||
if redis := os.environ.get("REDIS_URL") or main.get_config_key("redis_uri"):
|
||||
ret = ret.replace(redis, "redis://**************************")
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ function tg_code() {
|
|||
if (response.status == 401) {
|
||||
$(".auth-code-form").hide().fadeIn(300, () => {
|
||||
$("#monkey-close").html();
|
||||
bodymovin.loadAnimation({
|
||||
anim = bodymovin.loadAnimation({
|
||||
container: document.getElementById("monkey-close"),
|
||||
renderer: "canvas",
|
||||
loop: false,
|
||||
|
@ -127,6 +127,11 @@ function tg_code() {
|
|||
clearCanvas: true,
|
||||
}
|
||||
});
|
||||
anim.addEventListener("complete", function () {
|
||||
setTimeout(function () {
|
||||
anim.goToAndPlay(0);
|
||||
}, 2000);
|
||||
})
|
||||
});
|
||||
$(".code-input").removeAttr("disabled");
|
||||
$(".code-caption").html("Enter your Telegram 2FA password, then press <span style='color: #dc137b;'>Enter</span>");
|
||||
|
@ -267,7 +272,7 @@ function process_next() {
|
|||
} else {
|
||||
$(".auth-code-form").hide().fadeIn(300, () => {
|
||||
$("#monkey").html();
|
||||
anim = bodymovin.loadAnimation({
|
||||
anim2 = bodymovin.loadAnimation({
|
||||
container: document.getElementById("monkey"),
|
||||
renderer: "canvas",
|
||||
loop: false,
|
||||
|
@ -277,9 +282,9 @@ function process_next() {
|
|||
clearCanvas: true,
|
||||
}
|
||||
});
|
||||
anim.addEventListener("complete", function () {
|
||||
anim2.addEventListener("complete", function () {
|
||||
setTimeout(function () {
|
||||
anim.goToAndPlay(0);
|
||||
anim2.goToAndPlay(0);
|
||||
}, 2000);
|
||||
})
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue