xync-bot 0.3.27__tar.gz → 0.3.28__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.
- {xync_bot-0.3.27/xync_bot.egg-info → xync_bot-0.3.28}/PKG-INFO +1 -1
- xync_bot-0.3.28/xync_bot/__init__.py +28 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/xync_bot/__main__.py +5 -13
- {xync_bot-0.3.27 → xync_bot-0.3.28/xync_bot.egg-info}/PKG-INFO +1 -1
- {xync_bot-0.3.27 → xync_bot-0.3.28}/xync_bot.egg-info/SOURCES.txt +1 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/.env.dist +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/.gitignore +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/.pre-commit-config.yaml +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/makefile +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/pager.py +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/pyproject.toml +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/setup.cfg +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/test_main.http +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/xync_bot/loader.py +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/xync_bot/routers/__init__.py +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/xync_bot/routers/cond/__init__.py +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/xync_bot/routers/cond/func.py +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/xync_bot/routers/main/__init__.py +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/xync_bot/routers/main/handler.py +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/xync_bot/routers/order.py +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/xync_bot/routers/pay/cd.py +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/xync_bot/routers/pay/dep.py +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/xync_bot/routers/pay/handler.py +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/xync_bot/routers/pay/window.py +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/xync_bot/routers/photo.py +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/xync_bot/routers/send/__init__.py +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/xync_bot/routers/vpn.py +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/xync_bot/routers/xicon.png +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/xync_bot/shared.py +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/xync_bot/store.py +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/xync_bot/typs.py +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/xync_bot.egg-info/dependency_links.txt +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/xync_bot.egg-info/requires.txt +0 -0
- {xync_bot-0.3.27 → xync_bot-0.3.28}/xync_bot.egg-info/top_level.txt +0 -0
|
@@ -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
|
|
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())
|
|
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
|