Advertisement
Dimka_lang2

Untitled

Mar 31st, 2020
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.34 KB | None | 0 0
  1. from SimpleQIWI import *
  2. import telebot
  3. from time import sleep
  4.  
  5. bot = telebot.TeleBot('10447#########################LqFDs')
  6.  
  7. mainKeyboard = telebot.types.ReplyKeyboardMarkup(True, True)
  8. mainKeyboard.row('Балансы киви кошельков')
  9. mainKeyboard.row('Перевести все деньги на один кошелек')
  10.  
  11. qiwiBalances = telebot.types.ReplyKeyboardMarkup(True, True)
  12. qiwiBalances.row('узнать баланс киви +7960####16')
  13. qiwiBalances.row('узнать баланс киви +7999####53')
  14. qiwiBalances.row('узнать баланс киви +796#####00')
  15. qiwiBalances.row('Узнать общий баланс всех кошельков')
  16.  
  17.  
  18.  
  19. login = "79############3"
  20. api_access_token = "9140################24e"
  21. api = QApi(token=api_access_token, phone=login)
  22.  
  23.  
  24.  
  25. def sending_toQiwi():
  26. token = "ae#################5a2"
  27. phone = "7###########16"
  28. api = QApi(token=token, phone=phone)
  29. sendingAmout = int(api.balance[0]) * 0.98
  30. print(api.balance)
  31. api.pay(account="7999#####53", amount=1, comment='Перевод всех бабок на 1 кивас')
  32. print(api.balance)
  33.  
  34.  
  35. def sending_toQiwi2():
  36. token = "ae5######################a2"
  37. phone = "796######600"
  38. api = QApi(token=token, phone=phone)
  39. sendingAmout = int(api.balance[0]) * 0.98
  40. print(api.balance)
  41. api.pay(account="799######53", amount=1, comment='Перевод всех бабок на 1 кивас')
  42. print(api.balance)
  43.  
  44.  
  45. @bot.message_handler(commands=['start'])
  46. def start_message(message):
  47. user_id_get = message.from_user.id
  48. if user_id_get == 6##########2:
  49. bot.send_message(message.chat.id,
  50. 'Приветствую, мой господин!',
  51. reply_markup=mainKeyboard)
  52.  
  53.  
  54. @bot.message_handler(content_types=['text'])
  55. def send_message(message):
  56. user_id_get = message.from_user.id
  57. if message.text == 'Балансы киви кошельков':
  58. bot.send_message(message.chat.id, 'Выбирай то, что тебе нужно',
  59. reply_markup=qiwiBalances)
  60. if message.text == 'узнать баланс киви +79#######6' and user_id_get == 6#####2:
  61. login = "79########16"
  62. api_access_token = "ae5023###########225a2"
  63. api = QApi(token=api_access_token, phone=login)
  64. theFirst_balance = api.balance[0]
  65. print('Баланс киви кошелька 7###############6: ' + str(theFirst_balance))
  66. bot.send_message(message.chat.id, 'Баланс киви кошелька : ' + str(theFirst_balance) + ' Рублей ',
  67. reply_markup=mainKeyboard)
  68. if message.text == 'узнать баланс киви +799#######453':
  69. login = "7############53"
  70. api_access_token = "9140##################b24e"
  71. api = QApi(token=api_access_token, phone=login)
  72. theSecond_balance = api.balance[0]
  73. print('Баланс киви кошелька 7#################6: ' + str(theSecond_balance))
  74. bot.send_message(message.chat.id, 'Баланс киви кошелька : ' + str(theSecond_balance) + ' Рублей',
  75. reply_markup=mainKeyboard)
  76. if message.text == 'узнать баланс киви +7#############0' and user_id_get == 6###########2:
  77. login = "79###########0"
  78. api_access_token = "f85e853#############f9e2"
  79. api = QApi(token=api_access_token, phone=login)
  80. the3th_balance = api.balance[0]
  81. print('Баланс киви кошелька 79##############0: ' + str(the3th_balance))
  82. bot.send_message(message.chat.id, 'Баланс киви кошелька : ' + str(the3th_balance) + ' Рублей',
  83. reply_markup=mainKeyboard)
  84. if message.text == 'Узнать общий баланс всех кошельков' and user_id_get == ##########:
  85. login = "7##############0"
  86. api_access_token = "f8############9e2"
  87. api = QApi(token=api_access_token, phone=login)
  88. the3th_balance = api.balance[0]
  89. print('Баланс киви кошелька 7#############0: ' + str(the3th_balance))
  90.  
  91. login = "7##############3"
  92. api_access_token = "914########################24e"
  93. api = QApi(token=api_access_token, phone=login)
  94. theSecond_balance = api.balance[0]
  95. print('Баланс киви кошелька 79############16: ' + str(theSecond_balance))
  96.  
  97. login = "7######6"
  98. api_access_token = "ae50################5a2"
  99. api = QApi(token=api_access_token, phone=login)
  100. theFirst_balance = api.balance[0]
  101. print('Баланс киви кошелька 7################6: ' + str(theFirst_balance))
  102.  
  103. AllBalances = theFirst_balance + theSecond_balance + the3th_balance
  104. bot.send_message(message.chat.id, 'Общий баланс : ' + str(AllBalances) + ' Рублей ',
  105. reply_markup=mainKeyboard)
  106. if message.text == 'Перевести все деньги на один кошелек' and user_id_get == 6############2:
  107. sending_toQiwi()
  108. sending_toQiwi2()
  109. bot.send_message(message.chat.id, 'Деньги были переведены!', reply_markup=mainKeyboard)
  110.  
  111. else:
  112. pass
  113.  
  114.  
  115.  
  116. bot.polling()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement