-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
loader.py
26 lines (21 loc) · 939 Bytes
/
loader.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from aiogram import Bot, Dispatcher, types
from aiogram.contrib.fsm_storage.memory import MemoryStorage
from data import config
from utils.db_api.db_file import DataBase
from glQiwiApi import YooMoneyAPI, QiwiP2PClient
from utils.misc.pycrystalpay import CrystalPay
bot = Bot(token=config.BOT_TOKEN, parse_mode=types.ParseMode.HTML)
storage = MemoryStorage()
dp = Dispatcher(bot, storage=storage)
db = DataBase("db.db")
if config.platega["🥝 QIWI"]["key"]:
client_qiwi = QiwiP2PClient(secret_p2p=config.platega["🥝 QIWI"]["key"])
if config.platega["🟣 YooMoney"]["key"]:
client_ym = YooMoneyAPI(api_access_token=config.platega["🟣 YooMoney"]["key"])
if config.platega["💎 CrystalPay"]["key"]:
client_cry = CrystalPay(
auth_secret=config.platega["💎 CrystalPay"]["key"],
auth_login=config.platega["💎 CrystalPay"]["login"]
)
def truncate(n, c=2):
return int(n * (10 ** c)) / (10 ** c)