yeref 0.24.24__tar.gz → 0.24.25__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.
- {yeref-0.24.24 → yeref-0.24.25}/PKG-INFO +1 -1
- {yeref-0.24.24 → yeref-0.24.25}/setup.py +1 -1
- {yeref-0.24.24 → yeref-0.24.25}/yeref/yeref.py +39 -7
- {yeref-0.24.24 → yeref-0.24.25}/yeref.egg-info/PKG-INFO +1 -1
- {yeref-0.24.24 → yeref-0.24.25}/pyproject.toml +0 -0
- {yeref-0.24.24 → yeref-0.24.25}/setup.cfg +0 -0
- {yeref-0.24.24 → yeref-0.24.25}/yeref/__init__.py +0 -0
- {yeref-0.24.24 → yeref-0.24.25}/yeref/l_.py +0 -0
- {yeref-0.24.24 → yeref-0.24.25}/yeref/tonweb.js +0 -0
- {yeref-0.24.24 → yeref-0.24.25}/yeref.egg-info/SOURCES.txt +0 -0
- {yeref-0.24.24 → yeref-0.24.25}/yeref.egg-info/dependency_links.txt +0 -0
- {yeref-0.24.24 → yeref-0.24.25}/yeref.egg-info/top_level.txt +0 -0
@@ -211,7 +211,7 @@ BOT_CADMIN_ = '☐☑'
|
|
211
211
|
BOT_VARS_ = '{"BOT_PROMO": "#911", "BOT_CHANNEL": 0, "BOT_CHANNELTID": 0, "BOT_GROUP": 0, "BOT_GROUPTID": 0, "BOT_CHATGPT": "", "BOT_GEO": 0, "BOT_TZ": "+00:00", "BOT_DT": "", "BOT_LZ": "en", "BOT_LC": "en", "BOT_ISSTARTED": 0, "BOT_ISMENTIONED": 0}'
|
212
212
|
BOT_LSTS_ = '{"BOT_ADMINS": [], "BOT_COMMANDS": ["/start"]}'
|
213
213
|
USER_VARS_ = '{"USER_TEXT": "", "USER_REACTION": "", "USER_PUSH": "", "USER_EMAIL": "", "USER_PROMO": "", "USER_CONTACT": "", "USER_GEO": "", "USER_UTM": "", "USER_ID": 0, "USER_DT": "", "USER_TZ": "+00:00", "USER_LC": "en", "USER_LZ": "en", "USER_ISADMIN": 0, "USER_ISBLOG": 0, "USER_ISPREMIUM": 0, "USER_BALL": 0, "USER_RAND": 0, "USER_QUIZ": 0, "USER_DICE": 0, "MSGID_PAID": 0, "DATE_TIME": 0}'
|
214
|
-
USER_LSTS_ = '{"USER_UTMREF": [], "USER_PAYMENTS": []}'
|
214
|
+
USER_LSTS_ = '{"USER_UTMREF": [], "USER_PAYMENTS": [], "USER_TXS": []}'
|
215
215
|
|
216
216
|
UB_CONFIG_ = '☑☑☑☐☐☑☑☐☐☐☐☐☐'
|
217
217
|
UB_CMONITOR_ = '☐'
|
@@ -15631,14 +15631,26 @@ async def ch_games(USER_GAMES, game, condition, balls=-1):
|
|
15631
15631
|
# return USER_GAMES
|
15632
15632
|
|
15633
15633
|
|
15634
|
-
async def
|
15635
|
-
|
15634
|
+
async def upd_user_data(ENT_TID, data, web_app_init_data, PROJECT_USERNAME, BASE_P, req_url=''):
|
15635
|
+
chat_id = int(web_app_init_data.get('user', {}).get('id'))
|
15636
|
+
username = web_app_init_data.get('user', {}).get('username', None)
|
15637
|
+
first_name = web_app_init_data.get('user', {}).get('first_name', '')
|
15638
|
+
last_name = web_app_init_data.get('user', {}).get('last_name', '')
|
15639
|
+
full_name = f"{first_name} {last_name}".strip()
|
15640
|
+
lc = web_app_init_data.get('user', {}).get('language_code', 'en')
|
15641
|
+
is_premium = web_app_init_data.get('user', {}).get('is_premium', None)
|
15642
|
+
usr_sig = web_app_init_data.get('signature', '')
|
15643
|
+
|
15644
|
+
page = data.get('page', '')
|
15645
|
+
connectedAddress = data.get('connectedAddress', '')
|
15646
|
+
|
15636
15647
|
USER_TID = chat_id
|
15637
15648
|
USER_VARS = json.loads(USER_VARS_)
|
15638
15649
|
USER_LSTS = json.loads(USER_LSTS_)
|
15639
15650
|
USER_GAMES = {}
|
15640
15651
|
print(f"start get usernv a, {USER_LSTS=}")
|
15641
15652
|
try:
|
15653
|
+
tid = str(ENT_TID).replace('-', '')
|
15642
15654
|
schema_name = 'USER'
|
15643
15655
|
balls = 1
|
15644
15656
|
if PROJECT_USERNAME == 'FereyBotBot':
|
@@ -15649,7 +15661,7 @@ async def get_user_vars(PROJECT_USERNAME, BASE_P, ENT_TID, chat_id, lc, username
|
|
15649
15661
|
elif PROJECT_USERNAME == 'FereyGroupBot':
|
15650
15662
|
schema_name = 'GROUPP'
|
15651
15663
|
|
15652
|
-
sql = f"SELECT USER_TID, USER_GAMES, USER_VARS, USER_LSTS FROM {schema_name}_{
|
15664
|
+
sql = f"SELECT USER_TID, USER_GAMES, USER_VARS, USER_LSTS FROM {schema_name}_{tid}.USER WHERE USER_TID=$1"
|
15653
15665
|
data_user = await db_select_pg(sql, (chat_id,), BASE_P)
|
15654
15666
|
print(f"{data_user=}")
|
15655
15667
|
if len(data_user):
|
@@ -15666,8 +15678,7 @@ async def get_user_vars(PROJECT_USERNAME, BASE_P, ENT_TID, chat_id, lc, username
|
|
15666
15678
|
if lc in ['zh', 'zh-chs', 'zh-cht', 'ja', 'ko', 'zh-CN', 'zh-TW', 'th', 'vi', 'tw', 'sg']:
|
15667
15679
|
lz = 'zh'
|
15668
15680
|
# arabic # ir, af
|
15669
|
-
elif lc in ['ar-XA', 'ar', 'tr', 'ur', 'fa', 'tj', 'dz', 'eg', 'iq', 'sy', 'ae', 'sa', 'tn', 'ir',
|
15670
|
-
'af']:
|
15681
|
+
elif lc in ['ar-XA', 'ar', 'tr', 'ur', 'fa', 'tj', 'dz', 'eg', 'iq', 'sy', 'ae', 'sa', 'tn', 'ir', 'af']:
|
15671
15682
|
lz = 'ar'
|
15672
15683
|
# spanish # portugal: 'pt', 'br', 'ao', 'mz'
|
15673
15684
|
elif lc in ['es', 'ar', 'cl', 'co', 'cu', 've', 'bo', 'pe', 'ec', 'pt', 'br', 'ao', 'mz']:
|
@@ -15684,8 +15695,29 @@ async def get_user_vars(PROJECT_USERNAME, BASE_P, ENT_TID, chat_id, lc, username
|
|
15684
15695
|
USER_VARS['USER_SIG'] = usr_sig
|
15685
15696
|
USER_VARS['USER_ISPREMIUM'] = is_premium
|
15686
15697
|
|
15698
|
+
if connectedAddress:
|
15699
|
+
print(f"{connectedAddress=}, {USER_VARS=}")
|
15700
|
+
USER_VARS['USER_WALLET'] = connectedAddress
|
15701
|
+
print(f"after {req_url=}, {USER_VARS=}")
|
15702
|
+
print(f"after {data.get('amount', None)=}, {data=}")
|
15703
|
+
|
15704
|
+
if req_url and data.get('amount', None):
|
15705
|
+
amount = data.get('amount', None)
|
15706
|
+
address = data.get('address', '')
|
15707
|
+
DT_START = datetime.now(timezone.utc).strftime('%d-%m-%Y_%H-%M-%S')
|
15708
|
+
USER_TXS = USER_LSTS.get("USER_TXS", [])
|
15709
|
+
|
15710
|
+
USER_TXS.append({
|
15711
|
+
'TYPE': req_url,
|
15712
|
+
'AMOUNT': amount,
|
15713
|
+
'ADDRESS': address,
|
15714
|
+
'DT_START': DT_START,
|
15715
|
+
})
|
15716
|
+
USER_LSTS["USER_TXS"] = USER_TXS
|
15717
|
+
print(f"{USER_TXS=}, {USER_LSTS=}")
|
15718
|
+
|
15687
15719
|
sql = f"""
|
15688
|
-
INSERT INTO {schema_name}_{
|
15720
|
+
INSERT INTO {schema_name}_{tid}.USER (
|
15689
15721
|
USER_TID, USER_USERNAME, USER_FULLNAME, USER_GAMES, USER_VARS, USER_LSTS
|
15690
15722
|
)
|
15691
15723
|
VALUES ($1, $2, $3, $4, $5, $6)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|