yeref 0.29.18__tar.gz → 0.29.20__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yeref
3
- Version: 0.29.18
3
+ Version: 0.29.20
4
4
  Summary: desc-f
5
5
  Author: john smith
6
6
  Dynamic: author
@@ -2,7 +2,7 @@ from setuptools import setup
2
2
 
3
3
  setup(
4
4
  name='yeref',
5
- version='0.29.18',
5
+ version='0.29.20',
6
6
  description='desc-f',
7
7
  author='john smith',
8
8
  packages=['yeref'],
@@ -4624,7 +4624,7 @@ l_transfer_admin = {
4624
4624
  "ar": "👩🏽‍💻 <b>المستخدم</b> {0} يجب أن يكون <b>مشرفًا</b> في <b>{1}</b>"
4625
4625
  }
4626
4626
  l_transfer_transfer = {
4627
- "ru": "👩🏽‍💻 <b>Передать</b> <b>admin</b>-права на <b>{0}</b> пользователю {1} в @{2}-боте?",
4627
+ "ru": "👩🏽‍💻 <b>Передать</b> права администратора на <b>{0}</b> пользователю {1} в @{2}-боте?",
4628
4628
  "en": "👩🏽‍💻 <b>Transfer</b> <b>admin</b>-rights on <b>{0}</b> to user {1} in @{2}-bot?",
4629
4629
  "es": "👩🏽‍💻 ¿<b>Transferir</b> derechos de <b>admin</b> sobre <b>{0}</b> al usuario {1} en @{2}-bot?",
4630
4630
  "fr": "👩🏽‍💻 <b>Transférer</b> les droits <b>admin</b> sur <b>{0}</b> à l'utilisateur {1} dans @{2}-bot ?",
@@ -4640,7 +4640,7 @@ l_transfer_text = {
4640
4640
  "ar": "👩🏽‍💻 <b>لـ</b> نقل حقوق admin القناة في @{0}-bot استخدم الأمر:\n/transfer USER-ID، حيث المستخدم: مسؤول القناة وعضو في @{0}-bot (/id)\n\n⚙️ <b>الأوامر</b> /cmd"
4641
4641
  }
4642
4642
  l_transfer_done_to = {
4643
- "ru": "👩🏽‍💻 <b>Admin</b>-права на [<b>{0}</b>] успешно переданы {1}",
4643
+ "ru": "👩🏽‍💻 <b>Права</b> админиистратора на [<b>{0}</b>] успешно переданы {1}",
4644
4644
  "en": "👩🏽‍💻 <b>Admin</b>-rights on [<b>{0}</b>] successfully transferred to {1}",
4645
4645
  "es": "👩🏽‍💻 Los derechos de <b>Admin</b> en [<b>{0}</b>] se transfirieron correctamente a {1}",
4646
4646
  "fr": "👩🏽‍💻 Les droits <b>Admin</b> sur [<b>{0}</b>] ont été transférés avec succès à {1}",
@@ -4648,7 +4648,7 @@ l_transfer_done_to = {
4648
4648
  "ar": "👩🏽‍💻 تم نقل حقوق <b>Admin</b> على [<b>{0}</b>] بنجاح إلى {1}"
4649
4649
  }
4650
4650
  l_transfer_done_from = {
4651
- "ru": "👩🏽‍💻 <b>Admin</b>-права на [<b>{0}</b>] успешно получены от {1}",
4651
+ "ru": "👩🏽‍💻 <b>Права</b> администратора на [<b>{0}</b>] успешно получены от {1}",
4652
4652
  "en": "👩🏽‍💻 <b>Admin</b>-rights on [<b>{0}</b>] successfully obtained from {1}",
4653
4653
  "es": "👩🏽‍💻 Derechos de <b>Admin</b> en [<b>{0}</b>] obtenidos con éxito de {1}",
4654
4654
  "fr": "👩🏽‍💻 Les droits <b>Admin</b> sur [<b>{0}</b>] obtenus avec succès de {1}",
@@ -4657,7 +4657,7 @@ l_transfer_done_from = {
4657
4657
  }
4658
4658
 
4659
4659
  l_add_chn_text = {
4660
- "ru": "👮🏽‍♀️ <b>Добавь</b> @{0}-бота как <b>Administrator</b> через настройки своего канала:\n\n<blockquote>[👤 Добавить администратора]</blockquote>",
4660
+ "ru": "👮🏽‍♀️ <b>Добавь</b> @{0}-бота как [<b>Администратор</b>] через настройки своего канала:\n\n<blockquote>[👤 Добавить администратора]</blockquote>",
4661
4661
  "en": "👮🏽‍♀️ <b>Add</b> @{0}-bot as <b>Administrator</b> through your channel settings:\n\n<blockquote>[👤 Add administrator]</blockquote>",
4662
4662
  "es": "👮🏽‍♀️ <b>Agrega</b> @{0}-bot como <b>Administrador</b> a través de la configuración de tu canal:\n\n<blockquote>[👤 Agregar administrador]</blockquote>",
4663
4663
  "fr": "👮🏽‍♀️ <b>Ajoutez</b> @{0}-bot en tant qu'<b>Administrateur</b> via les paramètres de votre chaîne :\n\n<blockquote>[👤 Ajouter un administrateur]</blockquote>",
@@ -5088,7 +5088,7 @@ l_cmd_txt_grp = {
5088
5088
  "ar": "👩🏽‍💻 <b>انقر</b> [➕ إضافة مجموعة]",
5089
5089
  }
5090
5090
  l_add_group_text = {
5091
- "ru": "👇🏽 <b>Жми</b> на [➕ Добавить группу], чтобы добавить в свою группу (с настройками по ум) бота: @{0}\n\n<blockquote>👮🏽‍♀️ <b>Или</b> добавь бота как <b>Administrator</b> через настройки своей группы:\n[👤 Добавить администратора]\n\n👮🏽‍♀️ <b>Если</b> не добавляется группа, то измени <b>Должность</b> (см. скрин)</blockquote>",
5091
+ "ru": "👇🏽 <b>Жми</b> на [➕ Добавить группу], чтобы добавить в свою группу (с настройками по ум) бота: @{0}\n\n<blockquote>👮🏽‍♀️ <b>Или</b> добавь бота как [<b>Администратор</b>] через настройки своей группы:\n[👤 Добавить администратора]\n\n👮🏽‍♀️ <b>Если</b> не добавляется группа, то измени <b>Должность</b> (см. скрин)</blockquote>",
5092
5092
  "en": "👇🏽 <b>Click</b> on [➕ Add group] to add the bot to your group (with default settings): @{0}\n\n<blockquote>👮🏽‍♀️ <b>Or</b> add the bot as <b>Administrator</b> through your group's settings:\n[👤 Add administrator]\n\n👮🏽‍♀️ <b>If</b> the group is not added, change the <b>Role</b> (see screenshot)</blockquote>",
5093
5093
  "es": "👇🏽 <b>Haga clic</b> en [➕ Agregar grupo] para añadir el bot a su grupo (con configuración por defecto): @{0}\n\n<blockquote>👮🏽‍♀️ <b>O</b> añade el bot como <b>Administrador</b> desde la configuración de tu grupo:\n[👤 Agregar administrador]\n\n👮🏽‍♀️ <b>Si</b> el grupo no se añade, cambia la <b>Posición</b> (ver captura de pantalla)</blockquote>",
5094
5094
  "fr": "👇🏽 <b>Cliquez</b> sur [➕ Ajouter un groupe] pour ajouter le bot à votre groupe (avec paramètres par défaut) : @{0}\n\n<blockquote>👮🏽‍♀️ <b>Ou</b> ajoutez le bot en tant qu'<b>Administrateur</b> via les paramètres de votre groupe :\n[👤 Ajouter un administrateur]\n\n👮🏽‍♀️ <b>Si</b> le groupe n'est pas ajouté, modifiez la <b>Position</b> (voir capture d'écran)</blockquote>",
@@ -5137,7 +5137,7 @@ l_add_grp_button = {
5137
5137
  "ar": "➕ إضافة مجموعة"
5138
5138
  }
5139
5139
  l_add_grp_text = {
5140
- "ru": "👮🏽‍♀️ <b>Добавь</b> @{0}-бота как <b>Администратора</b> через настройки своей группы:\n\n<blockquote>[👤 Добавить администратора]</blockquote>",
5140
+ "ru": "👮🏽‍♀️ <b>Добавь</b> @{0}-бота как [<b>Администратор</b>] через настройки своей группы:\n\n<blockquote>[👤 Добавить администратора]</blockquote>",
5141
5141
  "en": "👮🏽‍♀️ <b>Add</b> @{0}-bot as <b>Administrator</b> through your group settings:\n\n<blockquote>[👤 Add administrator]</blockquote>",
5142
5142
  "es": "👮🏽‍♀️ <b>Agrega</b> @{0}-bot como <b>Administrador</b> a través de la configuración de tu grupo:\n\n<blockquote>[👤 Agregar administrador]</blockquote>",
5143
5143
  "fr": "👮🏽‍♀️ <b>Ajoutez</b> @{0}-bot en tant qu'<b>Administrateur</b> via les paramètres de votre groupe :\n\n<blockquote>[👤 Ajouter un administrateur]</blockquote>",
@@ -5780,7 +5780,7 @@ l_userbot_cmd_all = {
5780
5780
  "ar": "\n<b>المستخدمون/الروبوتات/المجموعات/القنوات</b>: {0}",
5781
5781
  }
5782
5782
  l_userbot_cmd_admin = {
5783
- "ru": "\n\n<b>Админ</b> <u>групп/каналов</u>: <code>{0}</code>\n{1}",
5783
+ "ru": "\n\n<b>Администратор</b> <u>групп/каналов</u>: <code>{0}</code>\n{1}",
5784
5784
  "en": "\n\n<b>Admin</b> <u>groups/channels</u>: <code>{0}</code>\n{1}",
5785
5785
  "es": "\n\n<b>Admin</b> <u>grupos/canales</u>: <code>{0}</code>\n{1}",
5786
5786
  "fr": "\n\n<b>Administrateur</b> <u>groupes/canaux</u> : <code>{0}</code>\n{1}",
@@ -13732,6 +13732,63 @@ async def edit_simple2(bot, chat_id, user_id, entity_id, post_id, message_id, cu
13732
13732
 
13733
13733
 
13734
13734
  # region fun
13735
+ async def is_reason(user_id, user_username, user_full_name, ENT_CBAN):
13736
+ result = None
13737
+ try:
13738
+ new_, nousername_, cas_, symbols_, zalgo_ = list(ENT_CBAN)
13739
+
13740
+ if nousername_ == '☑' and not user_username:
13741
+ result = 'no @username'
13742
+ return
13743
+ if new_ == '☑' and user_id > old_tid:
13744
+ result = 'new id'
13745
+ return
13746
+ if cas_ == '☑':
13747
+ headers = {
13748
+ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "
13749
+ "(KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36",
13750
+ "Accept": "application/json",
13751
+ "Accept-Language": "en;q=0.9",
13752
+ "Referer": "https://cas.chat/",
13753
+ }
13754
+ async with httpx.AsyncClient(http2=True, headers=headers, timeout=10) as client:
13755
+ url = f"https://api.cas.chat/check?user_id={user_id}"
13756
+ resp = await client.get(url)
13757
+
13758
+ print(f"? JSON: {url}")
13759
+ if resp.status_code == 200 and resp.headers.get("Content-Type", "").startswith("application/json"):
13760
+ data = resp.json()
13761
+
13762
+ print(f"? JSON: {data}")
13763
+ if data.get("ok") is True:
13764
+ print(f"✅ JSON: {data}")
13765
+ result = f"cas: {url}"
13766
+ return
13767
+ if zalgo_ == '☑':
13768
+ # '͞'
13769
+ # arr_zalgo = list(map(chr, range(768, 879)))
13770
+ # if len([item for item in arr_zalgo if item in user_full_name]):
13771
+ if has_zalgo(user_full_name):
13772
+ result = f"zalgo symbols: {user_full_name}"
13773
+ return
13774
+ if symbols_ == '☑':
13775
+ # ؀ , 世 文 , ችግሩ (ethiop)
13776
+ # arr_arab_hier = list(map(chr, range(1536, 1791))) + list(map(chr, range(19968, 40959))) + list(
13777
+ # map(chr, range(4608, 4991)))
13778
+ # ؀ , 世 文 , ችግሩ (эфиопский)
13779
+ if has_non_european_glyph(user_full_name):
13780
+ result = f"arab/zh symbols: {user_full_name}"
13781
+ return
13782
+ except TelegramRetryAfter as e:
13783
+ logger.info(log_ % f"TelegramRetryAfter {e.retry_after}")
13784
+ await asyncio.sleep(e.retry_after + 1)
13785
+ except Exception as e:
13786
+ logger.info(log_ % str(e))
13787
+ await asyncio.sleep(round(random.uniform(0, 1), 2))
13788
+ finally:
13789
+ return result
13790
+
13791
+
13735
13792
  def has_non_european_glyph(text):
13736
13793
  if text.isascii(): return False
13737
13794
  return bool(PAT.search(text))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yeref
3
- Version: 0.29.18
3
+ Version: 0.29.20
4
4
  Summary: desc-f
5
5
  Author: john smith
6
6
  Dynamic: author
File without changes
File without changes
File without changes
File without changes