yeref 0.25.24__py3-none-any.whl → 0.25.26__py3-none-any.whl

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.
yeref/yeref.py CHANGED
@@ -113,7 +113,8 @@ from yeref.l_ import l_inline_demo, l_inline_bot, l_inline_post, l_inline_media,
113
113
  l_refund_title, l_refund_already_done, l_refund_success, l_refund_incorrect, \
114
114
  l_tools_has_restricted, l_bot_need_start_add, l_chn_need_boost_for_story, l_bot_need_restart_extra_bot, \
115
115
  l_bot_pub_with_payment, l_sub_to_private_channel, l_payment_6_months, l_payment_1_months, l_material, \
116
- l_payment_success, l_payment_hashtag, l_inline_codex, l_permissions_add_members
116
+ l_payment_success, l_payment_hashtag, l_inline_codex, l_permissions_add_members, l_admin_closed_group_reject, \
117
+ l_insert_group_link, l_start_group_check, l_check_group_members, l_admin_rights_required
117
118
 
118
119
  # region group links
119
120
  payment_link = 'http://bagazhznaniy.ru/wp-content/uploads/2014/03/zhivaya-priroda.jpg'
@@ -4019,6 +4020,34 @@ async def check_schema_exists(schema_name, db_pool):
4019
4020
  return result
4020
4021
 
4021
4022
 
4023
+ async def not_del_if_payments(chat_id, status, BASE_P):
4024
+ try:
4025
+ sql = "SELECT USER_VARS, USER_LSTS FROM \"USER\" WHERE USER_TID=$1"
4026
+ data_users = await db_select_pg(sql, (chat_id,), BASE_P)
4027
+ if not len(data_users): return
4028
+ print(f"{data_users=}")
4029
+ USER_VARS, USER_LSTS = data_users[0]
4030
+
4031
+ USER_LSTS = json.loads(USER_LSTS or USER_LSTS_)
4032
+ USER_TXS = USER_LSTS.get("USER_TXS", [])
4033
+ USER_PAYMENTS = USER_LSTS.get("USER_PAYMENTS", [])
4034
+ USER_STATUSES = USER_LSTS.get("USER_STATUSES", [])
4035
+
4036
+ if len(USER_TXS) or len(USER_PAYMENTS):
4037
+ dt_ = datetime.now(timezone.utc).strftime('%d-%m-%Y_%H-%M-%S')
4038
+ USER_STATUSES.append({status: dt_})
4039
+ USER_LSTS["USER_STATUSES"] = USER_STATUSES
4040
+ USER_LSTS = json.dumps(USER_LSTS, ensure_ascii=False)
4041
+
4042
+ sql = "UPDATE \"USER\" SET USER_LSTS=$1 WHERE USER_TID=$2"
4043
+ await db_change_pg(sql, (USER_LSTS, chat_id,), BASE_P)
4044
+ elif status in ['left', 'kicked']:
4045
+ sql = "DELETE FROM \"USER\" WHERE USER_TID=$1"
4046
+ await db_change_pg(sql, (chat_id,), BASE_P)
4047
+ print("DELETE FROM \"USER\" WHERE USER_TID=$1")
4048
+ except Exception as e:
4049
+ logger.info(log_ % str(e))
4050
+ await asyncio.sleep(round(random.uniform(0, 1), 2))
4022
4051
  # endregion
4023
4052
 
4024
4053
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yeref
3
- Version: 0.25.24
3
+ Version: 0.25.26
4
4
  Summary: desc-f
5
5
  Author: john smith
6
6
  Dynamic: author
@@ -0,0 +1,8 @@
1
+ yeref/__init__.py,sha256=Qpv3o6Xa78VdLcsSRmctGtpnYE9btpAkCekgGhgJyXM,49
2
+ yeref/l_.py,sha256=LsciHUN0b5NbsLsRRbG12blZGXVr_i4Fhj2aQItIZbI,1173447
3
+ yeref/tonweb.js,sha256=Jf6aFOQ1OIY4q7fINYz-m5LsI3seMus124M5SYYZmtE,443659
4
+ yeref/yeref.py,sha256=5zBKB6tuYTWiNR0Ig8T6aPcE2y8UwF8evLdJ61ikOUI,1024265
5
+ yeref-0.25.26.dist-info/METADATA,sha256=TSBCijCgFKtFAyyU2Or6JwvW9x6Y_81dl-vsyD3VHDg,119
6
+ yeref-0.25.26.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
+ yeref-0.25.26.dist-info/top_level.txt,sha256=yCQKchWHbfV-3OuQPYRdi2loypD-nmbDJbtt3OuKKkY,6
8
+ yeref-0.25.26.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- yeref/__init__.py,sha256=Qpv3o6Xa78VdLcsSRmctGtpnYE9btpAkCekgGhgJyXM,49
2
- yeref/l_.py,sha256=LsciHUN0b5NbsLsRRbG12blZGXVr_i4Fhj2aQItIZbI,1173447
3
- yeref/tonweb.js,sha256=Jf6aFOQ1OIY4q7fINYz-m5LsI3seMus124M5SYYZmtE,443659
4
- yeref/yeref.py,sha256=d5qKhmxWMu6TBy9GBT7J0LqbHahYaZDbr03paewnLiM,1022822
5
- yeref-0.25.24.dist-info/METADATA,sha256=z-PlgaWT-wGvcyGIzYIFFYXmF0JA8B5LTSILMeiDU6A,119
6
- yeref-0.25.24.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
- yeref-0.25.24.dist-info/top_level.txt,sha256=yCQKchWHbfV-3OuQPYRdi2loypD-nmbDJbtt3OuKKkY,6
8
- yeref-0.25.24.dist-info/RECORD,,