-
Notifications
You must be signed in to change notification settings - Fork 10
/
config.py
120 lines (102 loc) · 3.83 KB
/
config.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
import importdir
import json
import re
import telebot
from telebot import types
from functions import *
from coinpayment import CoinPayments
from datetime import datetime
from decimal import *
from database import database as db
from settings import TOKEN, URL
bot = telebot.TeleBot(TOKEN, threaded=True)
admin_db = db.session.query(db.Admin).first()
MERCHANT_ID = admin_db.merchant_ID
PUBLIC_KEY = admin_db.merchant_pbkey
PRIVATE_KEY = admin_db.merchant_pkey
ADMIN_ID = admin_db.user_id
payment_client = CoinPayments(PUBLIC_KEY, PRIVATE_KEY, ipn_url=URL + "pay")
keys = types.ReplyKeyboardMarkup()
force_r = types.ForceReply()
en_home_keys = types.ReplyKeyboardMarkup()
it_home_keys = types.ReplyKeyboardMarkup()
select_lang_markup = [
["English 🇬🇧", "Italiano 🇮🇹"]
]
fcx_markup = {
"en": [
["Balance BTC"],
["🏦 Deposit", "🏧 Withdrawal"],
["💵 Reinvest", "📜 Transactions"],
["⛳ Team", "🇬🇧 Language", "🤝 Support"]
],
"it": [
["Bilance BTC"],
["🏦 Depositare", "🏧 Ritiro"],
["💵 Reinvest", "📜 Transazioni"],
["⛳ Squadra", "🇬🇧 linguaggio", "🤝 Supporto"]
]
}
dashboard = {
"en": en_home_keys,
"it": it_home_keys
}
en_home_keys.keyboard = fcx_markup.get("en")
it_home_keys.keyboard = fcx_markup.get("it")
lang_keys = types.ReplyKeyboardMarkup(
resize_keyboard=True,
one_time_keyboard=True
)
lang_keys.keyboard = select_lang_markup
en_confirm_markup = types.InlineKeyboardMarkup(row_width=2)
it_confirm_markup = types.InlineKeyboardMarkup()
en_confirm_btn = types.InlineKeyboardButton(
text="Confirm", callback_data="confirm_address")
en_modify_btn = types.InlineKeyboardButton(
text="Cancel", callback_data="cancel_address")
it_confirm_btn = types.InlineKeyboardButton(
text="Confermare", callback_data="confirm_address")
it_modify_btn = types.InlineKeyboardButton(
text="Annulla", callback_data="cancel_address")
en_confirm_markup.add(en_confirm_btn, en_modify_btn)
it_confirm_markup.add(it_confirm_btn, it_modify_btn)
confirm = {
"en": en_confirm_markup,
"it": it_confirm_markup
}
en_confirm_order_markup = types.InlineKeyboardMarkup(row_width=2)
it_confirm_order_markup = types.InlineKeyboardMarkup()
en_confirm_order_btn = types.InlineKeyboardButton(
text="Confirm", callback_data="confirm_order")
it_confirm_order_btn = types.InlineKeyboardButton(
text="Confermare", callback_data="confirm_order")
en_cancel_order_btn = types.InlineKeyboardButton(
text="Cancel", callback_data="cancel_order")
it_cancel_order_btn = types.InlineKeyboardButton(
text="Annulla", callback_data="cancel_order")
en_confirm_order_markup.add(en_confirm_order_btn, en_cancel_order_btn)
it_confirm_order_markup.add(it_confirm_order_btn, it_cancel_order_btn)
confirm_order = {
"en": en_confirm_order_markup,
"it": it_confirm_order_markup
}
en_confirm_reinvestment_markup = types.InlineKeyboardMarkup(row_width=2)
it_confirm_reinvestment_markup = types.InlineKeyboardMarkup(row_width=2)
en_confirm_reinvestment_btn = types.InlineKeyboardButton(
text="Confirm", callback_data="confirm_reinvestment")
it_confirm_reinvestment_btn = types.InlineKeyboardButton(
text="Confermare", callback_data="confirm_reinvestment")
en_cancel_reinvestment_btn = types.InlineKeyboardButton(
text="Cancel", callback_data="cancel_reinvestment")
it_cancel_reinvestment_btn = types.InlineKeyboardButton(
text="Annulla", callback_data="cancel_reinvestment")
en_confirm_reinvestment_markup.add(
en_confirm_reinvestment_btn, en_cancel_reinvestment_btn)
it_confirm_reinvestment_markup.add(
it_confirm_reinvestment_btn, it_cancel_reinvestment_btn)
confirm_reinvestment = {
"en": en_confirm_reinvestment_markup,
"it": it_confirm_reinvestment_markup
}
withdrawal_minimum_amount = 0.002
importdir.do("features", globals())