Added and updated repositories 2026-01-10 01:09:56

This commit is contained in:
github-actions[bot]
2026-01-10 01:09:56 +00:00
parent 1c99e02dd0
commit 572fb61011
67 changed files with 5294 additions and 1704 deletions

View File

@@ -26,17 +26,20 @@
# scope: Api BirthdayTime 0.0.1
# ---------------------------------------------------------------------------------
import random
import asyncio
import calendar
import logging
import random
from datetime import datetime
from telethon.tl.functions.users import GetFullUserRequest
from telethon.tl.functions.account import UpdateProfileRequest
from telethon.errors.rpcerrorlist import UserPrivacyRestrictedError
from telethon.tl.functions.account import UpdateProfileRequest
from telethon.tl.functions.users import GetFullUserRequest
from .. import loader, utils
logger = logging.getLogger(__name__)
D_MSG = [
"Ждешь его?",
"Осталось немного)",
@@ -158,9 +161,9 @@ class DaysToMyBirthday(loader.Module):
self.db.set(__name__, "last_name", name)
except UserPrivacyRestrictedError:
self.db.set(__name__, "change_name", False)
print("Error: Can't change name due to privacy settings.")
logger.error("Error: Can't change name due to privacy settings.")
except Exception as e:
print(f"Error in checker: {e}")
logger.error(f"Error in checker: {e}")
finally:
await asyncio.sleep(60)
@@ -173,7 +176,7 @@ class DaysToMyBirthday(loader.Module):
user = await self.client(GetFullUserRequest(self.client.hikka_me.id))
name = user.users[0].last_name or ""
except Exception as e:
print(f"Error getting user info: {e}")
logger.error(f"Error getting user info: {e}")
await utils.answer(message, self.strings("error"))
return
@@ -191,7 +194,7 @@ class DaysToMyBirthday(loader.Module):
except UserPrivacyRestrictedError:
await utils.answer(message, self.strings("name_privacy_error"))
except Exception as e:
print(f"Error removing name: {e}")
logger.error(f"Error removing name: {e}")
await utils.answer(message, self.strings("error"))
else:
@@ -238,5 +241,5 @@ class DaysToMyBirthday(loader.Module):
)
except Exception as e:
print(f"Error in bt command: {e}")
logger.error(f"Error in bt command: {e}")
await utils.answer(message, self.strings("error"))