|
|
|
@ -190,9 +190,9 @@ def pay(message):
|
|
|
|
|
ds_dst = get_ds(API_TOKEN, dst_id)
|
|
|
|
|
src_nick = get_nick(API_TOKEN, src_id)
|
|
|
|
|
if tg_dst != 'null':
|
|
|
|
|
transfer_callback('http://127.0.0.1:2222/', API_TOKEN, src_nick, nick, amount)
|
|
|
|
|
transfer_callback('http://127.0.0.1:7002/', API_TOKEN, src_nick, nick, amount)
|
|
|
|
|
elif ds_dst != 'null':
|
|
|
|
|
transfer_callback('http://127.0.0.1:3333/', API_TOKEN, src_nick, nick, amount)
|
|
|
|
|
transfer_callback('http://127.0.0.1:7003/', API_TOKEN, src_nick, nick, amount)
|
|
|
|
|
else:
|
|
|
|
|
bot.reply_to(message, '/pay ник количество')
|
|
|
|
|
|
|
|
|
@ -225,7 +225,7 @@ def transfer_callback_api(it: Transfer_callback_api):
|
|
|
|
|
return 'Error'
|
|
|
|
|
|
|
|
|
|
def run_api():
|
|
|
|
|
uvicorn.run(app, host='127.0.0.1', port=2222)
|
|
|
|
|
uvicorn.run(app, host='127.0.0.1', port=7002)
|
|
|
|
|
|
|
|
|
|
# Запускаем API для переводов
|
|
|
|
|
api = Thread(target=run_api)
|
|
|
|
|