xync-bot 0.3.7.dev4__py3-none-any.whl → 0.3.24__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.
Potentially problematic release.
This version of xync-bot might be problematic. Click here for more details.
- xync_bot/__main__.py +36 -0
- xync_bot/loader.py +2 -0
- xync_bot/routers/__init__.py +41 -0
- xync_bot/routers/cond/__init__.py +1 -7
- xync_bot/routers/main/__init__.py +0 -0
- xync_bot/routers/{main.py → main/handler.py} +25 -57
- xync_bot/routers/pay/cd.py +49 -0
- xync_bot/routers/pay/dep.py +270 -0
- xync_bot/routers/pay/handler.py +247 -0
- xync_bot/routers/pay/window.py +244 -0
- xync_bot/shared.py +19 -0
- xync_bot/store.py +150 -0
- {xync_bot-0.3.7.dev4.dist-info → xync_bot-0.3.24.dist-info}/METADATA +1 -1
- xync_bot-0.3.24.dist-info/RECORD +22 -0
- xync_bot/__init__.py +0 -23
- xync_bot/routers/pay/main.py +0 -133
- xync_bot-0.3.7.dev4.dist-info/RECORD +0 -17
- {xync_bot-0.3.7.dev4.dist-info → xync_bot-0.3.24.dist-info}/WHEEL +0 -0
- {xync_bot-0.3.7.dev4.dist-info → xync_bot-0.3.24.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
xync_bot/__main__.py,sha256=Sdoy8sPA8-PFvYfTU24MoMTGgSJ3w7I7_mvNETJBXeA,1001
|
|
2
|
+
xync_bot/loader.py,sha256=4ZeR-yVMoOmswdLS0UEBG19K7JVcuvH6WpP-_0yAK3I,573
|
|
3
|
+
xync_bot/shared.py,sha256=PPzvt1ewowCInKE1bk2CWHPjnrV2eQJzKxgyxe3h7vk,496
|
|
4
|
+
xync_bot/store.py,sha256=46IX8yBAacb--Cea93timkk4JQPVTYswfMdwyqpcoL4,6087
|
|
5
|
+
xync_bot/typs.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
xync_bot/routers/__init__.py,sha256=30W7PmD3stkRebGh5J-9CJIlY5P-Ixrtlxb_W9usSo4,1083
|
|
7
|
+
xync_bot/routers/order.py,sha256=ZKWDLyiWrXzcR-aHKLBTBCACwp-P0Vvnr22T-EuLHaM,274
|
|
8
|
+
xync_bot/routers/photo.py,sha256=aq6ImIOoZQYTW-lEy26qjgj5TYAuk4bQjgiCv64mPJs,1203
|
|
9
|
+
xync_bot/routers/vpn.py,sha256=qKK55UrjEZeDvu7ljWXNUFBFgXTPTIEaCT2OAmKWky4,2219
|
|
10
|
+
xync_bot/routers/xicon.png,sha256=O57_kvzhVcCXSoGYZ61m0dW9pizY6gxR8Yj5aeCP0RQ,429283
|
|
11
|
+
xync_bot/routers/cond/__init__.py,sha256=AUP_V1TGUIa8GFTC_V2LF5YYEBrXdfrSm_O8ew5sXU8,4214
|
|
12
|
+
xync_bot/routers/cond/func.py,sha256=m0NWDKunbqDJQmhv_5UnpjxjRzn78GFG94ThOFLVlQo,4720
|
|
13
|
+
xync_bot/routers/main/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
+
xync_bot/routers/main/handler.py,sha256=OYH5H8zFY92Jo1Pkvr1VjgEkX9HyXT7bZcVETbZgP_0,8753
|
|
15
|
+
xync_bot/routers/pay/cd.py,sha256=yu5U0j8f1RncfagiuycCeUFWwZtLmbT-Mx8G8whfdg8,927
|
|
16
|
+
xync_bot/routers/pay/dep.py,sha256=znD5vScp3D960JgWaY7_y_oFQmgi6o8DBsv9cY0_dHI,10092
|
|
17
|
+
xync_bot/routers/pay/handler.py,sha256=djd4JgsjngIqETqr3ThaEe4mqOM-KRqPa7paS8AIYDM,10315
|
|
18
|
+
xync_bot/routers/pay/window.py,sha256=0JB7bwAccXyefP7iecP4DBv1pKvLRLMoQVCDV4b88x4,10961
|
|
19
|
+
xync_bot-0.3.24.dist-info/METADATA,sha256=KgxqgpV95lmXNnJFWxUlrqgskguFS6DRmwvSSCBZ3Mw,746
|
|
20
|
+
xync_bot-0.3.24.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
21
|
+
xync_bot-0.3.24.dist-info/top_level.txt,sha256=O2IjMc1ryAf0rwIXWohSNT5Kzcs9johgKRDz8lCC0rs,9
|
|
22
|
+
xync_bot-0.3.24.dist-info/RECORD,,
|
xync_bot/__init__.py
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
from asyncio import run
|
|
3
|
-
|
|
4
|
-
from PGram import Bot
|
|
5
|
-
from aiogram.client.default import DefaultBotProperties
|
|
6
|
-
from x_model import init_db
|
|
7
|
-
|
|
8
|
-
from xync_bot.routers.cond import cr
|
|
9
|
-
|
|
10
|
-
# from xync_bot.routers.main import mr
|
|
11
|
-
from xync_bot.routers.pay.main import pay as pay
|
|
12
|
-
|
|
13
|
-
if __name__ == "__main__":
|
|
14
|
-
from xync_bot.loader import TOKEN, TORM
|
|
15
|
-
|
|
16
|
-
logging.basicConfig(level=logging.INFO)
|
|
17
|
-
|
|
18
|
-
async def main() -> None:
|
|
19
|
-
cn = await init_db(TORM)
|
|
20
|
-
bot = Bot(TOKEN, [cr, pay], cn, default=DefaultBotProperties(parse_mode="HTML"))
|
|
21
|
-
await bot.start()
|
|
22
|
-
|
|
23
|
-
run(main())
|
xync_bot/routers/pay/main.py
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
from aiogram import Router, F
|
|
2
|
-
from aiogram.filters import Command
|
|
3
|
-
from aiogram.types import Message
|
|
4
|
-
from xync_schema import models
|
|
5
|
-
from aiogram.types import ReplyKeyboardMarkup, KeyboardButton
|
|
6
|
-
from aiogram.utils.keyboard import InlineKeyboardMarkup, InlineKeyboardButton
|
|
7
|
-
from aiogram import types
|
|
8
|
-
|
|
9
|
-
from aiogram.fsm.state import State, StatesGroup
|
|
10
|
-
from aiogram.fsm.context import FSMContext
|
|
11
|
-
|
|
12
|
-
pay = Router()
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class Cred(StatesGroup):
|
|
16
|
-
detail = State()
|
|
17
|
-
extra = State()
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class Addr(StatesGroup):
|
|
21
|
-
name = State()
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
@pay.message(Command("pay"))
|
|
25
|
-
async def main(msg: Message):
|
|
26
|
-
start = ReplyKeyboardMarkup(
|
|
27
|
-
keyboard=[[KeyboardButton(text="крипта"), KeyboardButton(text="валюта (фиат)")]], resize_keyboard=True
|
|
28
|
-
)
|
|
29
|
-
await msg.answer("что нужно?", reply_markup=start)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
@pay.message(F.text == "валюта (фиат)")
|
|
33
|
-
async def cur(msg: types.Message):
|
|
34
|
-
currencies = await models.Cur.all()
|
|
35
|
-
buttons = [[InlineKeyboardButton(text=cur.ticker, callback_data=f"cur_{cur.id}")] for cur in currencies]
|
|
36
|
-
keyboard = InlineKeyboardMarkup(inline_keyboard=buttons)
|
|
37
|
-
await msg.answer("Выберите валюту:", reply_markup=keyboard)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
@pay.message(F.text == "крипта")
|
|
41
|
-
async def coin(msg: types.Message):
|
|
42
|
-
crypt = await models.Coin.all()
|
|
43
|
-
buttons = [[InlineKeyboardButton(text=coin.ticker, callback_data=f"coin_{coin.id}")] for coin in crypt]
|
|
44
|
-
keyboard = InlineKeyboardMarkup(inline_keyboard=buttons)
|
|
45
|
-
await msg.answer("Выберите крипту:", reply_markup=keyboard)
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
@pay.callback_query(F.data.startswith("coin_"))
|
|
49
|
-
async def coinex(query: types.CallbackQuery):
|
|
50
|
-
ticker = query.data.replace("coin_", "")
|
|
51
|
-
ex_id = await models.Coinex.filter(coin_id=ticker).values_list("ex_id", flat=True)
|
|
52
|
-
ex = await models.Ex.filter(id__in=ex_id).values_list("name", flat=True)
|
|
53
|
-
if not ex:
|
|
54
|
-
await query.message.answer("Такой биржи нет")
|
|
55
|
-
else:
|
|
56
|
-
buttons = [[InlineKeyboardButton(text=i, callback_data=f"ad_{i}")] for i in ex]
|
|
57
|
-
keyboard = InlineKeyboardMarkup(inline_keyboard=buttons)
|
|
58
|
-
await query.message.answer("Выберите биржу", reply_markup=keyboard)
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
@pay.callback_query(F.data.startswith("cur_"))
|
|
62
|
-
async def pm(query: types.CallbackQuery, state: FSMContext):
|
|
63
|
-
ticker = query.data.replace("cur_", "")
|
|
64
|
-
pmcur = await models.Pmcur.filter(cur_id=ticker).values_list("pm_id", flat=True)
|
|
65
|
-
pmex = await models.Pmex.filter(pm_id__in=pmcur).values_list("id", flat=True)
|
|
66
|
-
pm = await models.PmexBank.filter(pmex_id__in=pmex).values_list("name", flat=True)
|
|
67
|
-
if not pm:
|
|
68
|
-
await query.message.answer("Такой платежки нет")
|
|
69
|
-
else:
|
|
70
|
-
buttons = [[InlineKeyboardButton(text=i, callback_data=f"pm_{i}")] for i in pm]
|
|
71
|
-
keyboard = InlineKeyboardMarkup(inline_keyboard=buttons)
|
|
72
|
-
await query.message.answer("Выберите платежку", reply_markup=keyboard)
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
# 4) для cur
|
|
76
|
-
@pay.callback_query(F.data.startswith("pm_"))
|
|
77
|
-
async def cred(query: types.CallbackQuery, state: FSMContext):
|
|
78
|
-
name = query.data.replace("pm_", "")
|
|
79
|
-
await state.update_data(name=name)
|
|
80
|
-
pmex_id = await models.PmexBank.filter(name=name).values_list("pmex_id", flat=True)
|
|
81
|
-
pm_id = await models.Pmex.filter(id__in=pmex_id).values_list("pm_id", flat=True)
|
|
82
|
-
pmcur = await models.Pmcur.get(id__in=pm_id)
|
|
83
|
-
await state.update_data(pmcur_id=pmcur.id)
|
|
84
|
-
await query.message.answer("Введите реквизиты")
|
|
85
|
-
await state.set_state(Cred.detail)
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
@pay.message(Cred.detail)
|
|
89
|
-
async def cred_detail(msg: types.Message, state: FSMContext):
|
|
90
|
-
user_id = msg.from_user.id
|
|
91
|
-
# user_id = 193017646
|
|
92
|
-
person_id = await models.User.get(username_id=user_id)
|
|
93
|
-
await state.update_data(person_id=person_id.person_id)
|
|
94
|
-
await state.update_data(detail=msg.text)
|
|
95
|
-
await msg.answer("Введите доп информацию")
|
|
96
|
-
await state.set_state(Cred.extra)
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
@pay.message(Cred.extra)
|
|
100
|
-
async def create_cred(msg: types.Message, state: FSMContext):
|
|
101
|
-
await state.update_data(extra=msg.text)
|
|
102
|
-
data = await state.get_data()
|
|
103
|
-
await state.clear()
|
|
104
|
-
# print(data)
|
|
105
|
-
data_create = {
|
|
106
|
-
"detail": data["detail"],
|
|
107
|
-
"name": data["name"],
|
|
108
|
-
"extra": data["extra"],
|
|
109
|
-
"person_id": data["person_id"],
|
|
110
|
-
"pmcur_id": data["pmcur_id"],
|
|
111
|
-
}
|
|
112
|
-
await models.Cred.create(**data_create)
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
# 4) для coin
|
|
116
|
-
@pay.callback_query(F.data.startswith("ad_"))
|
|
117
|
-
async def addr(query: types.CallbackQuery, state: FSMContext):
|
|
118
|
-
name = query.data.replace("ad_", "")
|
|
119
|
-
ex = await models.Ex.filter(name=name).values_list("id", flat=True)
|
|
120
|
-
await state.update_data(ex_id=ex)
|
|
121
|
-
await query.message.answer("Введите имя")
|
|
122
|
-
await state.set_state(Addr.name)
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
@pay.message(Addr.name)
|
|
126
|
-
async def addr_name(msg: types.Message, state: FSMContext):
|
|
127
|
-
# user_id = msg.from_user.id
|
|
128
|
-
user_id = 193017646
|
|
129
|
-
person_id = await models.User.get(username_id=user_id)
|
|
130
|
-
await state.update_data(person_id=person_id.person_id)
|
|
131
|
-
await state.update_data(name=msg.text)
|
|
132
|
-
await state.get_data()
|
|
133
|
-
await state.clear()
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
xync_bot/__init__.py,sha256=wiZpB8Bv4jjaHeGS_yt9HKtuLTHwx4nCsCgcrMesCFE,586
|
|
2
|
-
xync_bot/loader.py,sha256=wnhRRMJ6KSFAFZnDBGg9mbbktq34VHtcNSt89WuPn04,558
|
|
3
|
-
xync_bot/shared.py,sha256=MlKkTrsT29l7fF6-qAN9FO14cSuXuOuYxbNY5F4S2w4,137
|
|
4
|
-
xync_bot/typs.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
-
xync_bot/routers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
xync_bot/routers/main.py,sha256=FumWa48ORhV77Df6NbEosHfgmFIe_Y2ci6IkJCvU4Zs,9535
|
|
7
|
-
xync_bot/routers/order.py,sha256=ZKWDLyiWrXzcR-aHKLBTBCACwp-P0Vvnr22T-EuLHaM,274
|
|
8
|
-
xync_bot/routers/photo.py,sha256=aq6ImIOoZQYTW-lEy26qjgj5TYAuk4bQjgiCv64mPJs,1203
|
|
9
|
-
xync_bot/routers/vpn.py,sha256=qKK55UrjEZeDvu7ljWXNUFBFgXTPTIEaCT2OAmKWky4,2219
|
|
10
|
-
xync_bot/routers/xicon.png,sha256=O57_kvzhVcCXSoGYZ61m0dW9pizY6gxR8Yj5aeCP0RQ,429283
|
|
11
|
-
xync_bot/routers/cond/__init__.py,sha256=It4djVO8AxXL1I76buRz8yYF12dsjXaa4WNtPdb7CFc,4333
|
|
12
|
-
xync_bot/routers/cond/func.py,sha256=m0NWDKunbqDJQmhv_5UnpjxjRzn78GFG94ThOFLVlQo,4720
|
|
13
|
-
xync_bot/routers/pay/main.py,sha256=5swOvvKF2XA2UAwHewdidMoMONV4acTwR0mPyzA0ezA,5116
|
|
14
|
-
xync_bot-0.3.7.dev4.dist-info/METADATA,sha256=4T0s0NFTh9QNuQ3JpSLKarYsXY-OZjN0vTjGrkNbeQI,750
|
|
15
|
-
xync_bot-0.3.7.dev4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
16
|
-
xync_bot-0.3.7.dev4.dist-info/top_level.txt,sha256=O2IjMc1ryAf0rwIXWohSNT5Kzcs9johgKRDz8lCC0rs,9
|
|
17
|
-
xync_bot-0.3.7.dev4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|