xync-bot 0.3.28__tar.gz → 0.3.30.dev2__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.
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/.pre-commit-config.yaml +1 -1
- {xync_bot-0.3.28/xync_bot.egg-info → xync_bot-0.3.30.dev2}/PKG-INFO +1 -1
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/xync_bot/routers/main/handler.py +5 -3
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2/xync_bot.egg-info}/PKG-INFO +1 -1
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/.env.dist +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/.gitignore +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/makefile +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/pager.py +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/pyproject.toml +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/setup.cfg +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/test_main.http +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/xync_bot/__init__.py +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/xync_bot/__main__.py +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/xync_bot/loader.py +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/xync_bot/routers/__init__.py +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/xync_bot/routers/cond/__init__.py +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/xync_bot/routers/cond/func.py +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/xync_bot/routers/main/__init__.py +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/xync_bot/routers/order.py +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/xync_bot/routers/pay/cd.py +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/xync_bot/routers/pay/dep.py +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/xync_bot/routers/pay/handler.py +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/xync_bot/routers/pay/window.py +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/xync_bot/routers/photo.py +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/xync_bot/routers/send/__init__.py +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/xync_bot/routers/vpn.py +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/xync_bot/routers/xicon.png +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/xync_bot/shared.py +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/xync_bot/store.py +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/xync_bot/typs.py +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/xync_bot.egg-info/SOURCES.txt +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/xync_bot.egg-info/dependency_links.txt +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/xync_bot.egg-info/requires.txt +0 -0
- {xync_bot-0.3.28 → xync_bot-0.3.30.dev2}/xync_bot.egg-info/top_level.txt +0 -0
|
@@ -52,7 +52,7 @@ home_btns = InlineKeyboardMarkup(
|
|
|
52
52
|
# elif not (ref := await models.User.get_or_none(id=ref_id)):
|
|
53
53
|
# rs = f"No registered user #{ref_id}😬"
|
|
54
54
|
# else: # new user created
|
|
55
|
-
# user, cr = await models.User.
|
|
55
|
+
# user, cr = await models.User.tg_upsert(me, False)
|
|
56
56
|
# await user.update_from_dict({"ref": ref}).save()
|
|
57
57
|
# approve_btns = InlineKeyboardMarkup(
|
|
58
58
|
# inline_keyboard=[
|
|
@@ -75,6 +75,8 @@ async def arg_handler(msg: Message, command: CommandObject):
|
|
|
75
75
|
arg: dict[str, int | str] = {"id": int(command.args)} if command.args.isnumeric() else {"username": command.args}
|
|
76
76
|
if ref := await models.Username.get_or_none(**arg):
|
|
77
77
|
txt = f"Вас пригласил {ref.username and '@'+ref.username or ref.id}, бонус: комиссия 0% на первые $100 000"
|
|
78
|
+
else:
|
|
79
|
+
txt = f"Привет, {msg.from_user.full_name}! \nWelcome бонус: комиссия 0% на первые $10 000"
|
|
78
80
|
await msg.answer(txt, reply_markup=rm, parse_mode="Markdown")
|
|
79
81
|
|
|
80
82
|
|
|
@@ -122,7 +124,7 @@ async def my_user_set_status(my_chat_member: ChatMemberUpdated):
|
|
|
122
124
|
logging.info({"my_chat_member": my_chat_member.model_dump(exclude_none=True)})
|
|
123
125
|
u: User = my_chat_member.from_user
|
|
124
126
|
blocked = my_chat_member.new_chat_member.status in ("left", "kicked")
|
|
125
|
-
await models.User.
|
|
127
|
+
await models.User.tg_upsert(u, blocked)
|
|
126
128
|
|
|
127
129
|
|
|
128
130
|
@mr.my_chat_member()
|
|
@@ -140,7 +142,7 @@ async def user_set_status(my_chat_member: ChatMemberUpdated):
|
|
|
140
142
|
if forum.joined:
|
|
141
143
|
forum.joined = False
|
|
142
144
|
await forum.save()
|
|
143
|
-
return await models.User.
|
|
145
|
+
return await models.User.tg_upsert(u, blocked)
|
|
144
146
|
|
|
145
147
|
|
|
146
148
|
@mr.chat_member(ChatMemberUpdatedFilter(LEAVE_TRANSITION)) # юзер покинул группу Ордеров
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|