xync-bot 0.3.27__tar.gz → 0.3.29__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.

Potentially problematic release.


This version of xync-bot might be problematic. Click here for more details.

Files changed (34) hide show
  1. {xync_bot-0.3.27/xync_bot.egg-info → xync_bot-0.3.29}/PKG-INFO +1 -1
  2. xync_bot-0.3.29/xync_bot/__init__.py +28 -0
  3. {xync_bot-0.3.27 → xync_bot-0.3.29}/xync_bot/__main__.py +5 -13
  4. {xync_bot-0.3.27 → xync_bot-0.3.29}/xync_bot/routers/main/handler.py +2 -0
  5. {xync_bot-0.3.27 → xync_bot-0.3.29/xync_bot.egg-info}/PKG-INFO +1 -1
  6. {xync_bot-0.3.27 → xync_bot-0.3.29}/xync_bot.egg-info/SOURCES.txt +1 -0
  7. {xync_bot-0.3.27 → xync_bot-0.3.29}/.env.dist +0 -0
  8. {xync_bot-0.3.27 → xync_bot-0.3.29}/.gitignore +0 -0
  9. {xync_bot-0.3.27 → xync_bot-0.3.29}/.pre-commit-config.yaml +0 -0
  10. {xync_bot-0.3.27 → xync_bot-0.3.29}/makefile +0 -0
  11. {xync_bot-0.3.27 → xync_bot-0.3.29}/pager.py +0 -0
  12. {xync_bot-0.3.27 → xync_bot-0.3.29}/pyproject.toml +0 -0
  13. {xync_bot-0.3.27 → xync_bot-0.3.29}/setup.cfg +0 -0
  14. {xync_bot-0.3.27 → xync_bot-0.3.29}/test_main.http +0 -0
  15. {xync_bot-0.3.27 → xync_bot-0.3.29}/xync_bot/loader.py +0 -0
  16. {xync_bot-0.3.27 → xync_bot-0.3.29}/xync_bot/routers/__init__.py +0 -0
  17. {xync_bot-0.3.27 → xync_bot-0.3.29}/xync_bot/routers/cond/__init__.py +0 -0
  18. {xync_bot-0.3.27 → xync_bot-0.3.29}/xync_bot/routers/cond/func.py +0 -0
  19. {xync_bot-0.3.27 → xync_bot-0.3.29}/xync_bot/routers/main/__init__.py +0 -0
  20. {xync_bot-0.3.27 → xync_bot-0.3.29}/xync_bot/routers/order.py +0 -0
  21. {xync_bot-0.3.27 → xync_bot-0.3.29}/xync_bot/routers/pay/cd.py +0 -0
  22. {xync_bot-0.3.27 → xync_bot-0.3.29}/xync_bot/routers/pay/dep.py +0 -0
  23. {xync_bot-0.3.27 → xync_bot-0.3.29}/xync_bot/routers/pay/handler.py +0 -0
  24. {xync_bot-0.3.27 → xync_bot-0.3.29}/xync_bot/routers/pay/window.py +0 -0
  25. {xync_bot-0.3.27 → xync_bot-0.3.29}/xync_bot/routers/photo.py +0 -0
  26. {xync_bot-0.3.27 → xync_bot-0.3.29}/xync_bot/routers/send/__init__.py +0 -0
  27. {xync_bot-0.3.27 → xync_bot-0.3.29}/xync_bot/routers/vpn.py +0 -0
  28. {xync_bot-0.3.27 → xync_bot-0.3.29}/xync_bot/routers/xicon.png +0 -0
  29. {xync_bot-0.3.27 → xync_bot-0.3.29}/xync_bot/shared.py +0 -0
  30. {xync_bot-0.3.27 → xync_bot-0.3.29}/xync_bot/store.py +0 -0
  31. {xync_bot-0.3.27 → xync_bot-0.3.29}/xync_bot/typs.py +0 -0
  32. {xync_bot-0.3.27 → xync_bot-0.3.29}/xync_bot.egg-info/dependency_links.txt +0 -0
  33. {xync_bot-0.3.27 → xync_bot-0.3.29}/xync_bot.egg-info/requires.txt +0 -0
  34. {xync_bot-0.3.27 → xync_bot-0.3.29}/xync_bot.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xync-bot
3
- Version: 0.3.27
3
+ Version: 0.3.29
4
4
  Summary: Telegram bot with web app for xync net
5
5
  Author-email: Artemiev <mixartemev@gmail.com>
6
6
  License-Expression: GPL-3.0-or-later
@@ -0,0 +1,28 @@
1
+ from PGram import Bot
2
+ from aiogram.client.default import DefaultBotProperties
3
+ from aiogram.enums import UpdateType
4
+
5
+ from xync_bot.store import Store
6
+ from xync_bot.routers import last
7
+ from xync_bot.routers.main.handler import mr
8
+ from xync_bot.routers.pay.handler import pr
9
+ from xync_bot.routers.cond import cr
10
+ from xync_bot.routers.send import sd
11
+
12
+
13
+ au = [
14
+ UpdateType.MESSAGE,
15
+ UpdateType.CALLBACK_QUERY,
16
+ UpdateType.CHAT_MEMBER,
17
+ UpdateType.MY_CHAT_MEMBER,
18
+ ] # , UpdateType.CHAT_JOIN_REQUEST
19
+
20
+
21
+ class XyncBot(Bot):
22
+ def __init__(self, token, cn):
23
+ super().__init__(token, cn, [sd, cr, pr, mr, last], Store(), DefaultBotProperties(parse_mode="HTML"))
24
+
25
+ async def start(self, wh_host: str = None):
26
+ await super().start(au, wh_host)
27
+ self.dp.workflow_data["store"].glob = await Store.Global() # todo: refact store loading
28
+ return self
@@ -3,7 +3,6 @@ from asyncio import run
3
3
 
4
4
  from PGram import Bot
5
5
  from aiogram.client.default import DefaultBotProperties
6
- from aiogram.enums import UpdateType
7
6
  from x_model import init_db
8
7
 
9
8
  from xync_bot.store import Store
@@ -12,26 +11,19 @@ from xync_bot.routers.cond import cr
12
11
  from xync_bot.routers.pay.handler import pr
13
12
  from xync_bot.routers import last
14
13
  from xync_bot.routers.send import sd
14
+ from xync_bot.loader import TOKEN
15
15
 
16
- au = [
17
- UpdateType.MESSAGE,
18
- UpdateType.CALLBACK_QUERY,
19
- UpdateType.CHAT_MEMBER,
20
- UpdateType.MY_CHAT_MEMBER,
21
- ] # , UpdateType.CHAT_JOIN_REQUEST
22
- bot = Bot([sd, cr, pr, mr, last], Store(), au, default=DefaultBotProperties(parse_mode="HTML"))
23
16
 
24
17
  if __name__ == "__main__":
25
- from xync_bot.loader import TOKEN, TORM
18
+ from xync_bot.loader import TORM
26
19
 
27
20
  logging.basicConfig(level=logging.INFO)
28
21
 
29
22
  async def main() -> None:
30
23
  cn = await init_db(TORM)
24
+ bot = Bot(TOKEN, cn, [sd, cr, pr, mr, last], DefaultBotProperties(parse_mode="HTML"))
25
+
26
+ await bot.start()
31
27
  bot.dp.workflow_data["store"].glob = await Store.Global() # todo: refact store loading
32
- await bot.start(
33
- TOKEN,
34
- cn,
35
- )
36
28
 
37
29
  run(main())
@@ -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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xync-bot
3
- Version: 0.3.27
3
+ Version: 0.3.29
4
4
  Summary: Telegram bot with web app for xync net
5
5
  Author-email: Artemiev <mixartemev@gmail.com>
6
6
  License-Expression: GPL-3.0-or-later
@@ -5,6 +5,7 @@ makefile
5
5
  pager.py
6
6
  pyproject.toml
7
7
  test_main.http
8
+ xync_bot/__init__.py
8
9
  xync_bot/__main__.py
9
10
  xync_bot/loader.py
10
11
  xync_bot/shared.py
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