Advertisement
Guest User

Ntsfsf

a guest
Oct 21st, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.25 KB | None | 0 0
  1. cmd.hear(/^(?:бонус #1)$/i, async (message, bot) => {
  2. const test = 50000 //рандом
  3. if(message.user.auto < 51) return bot(`Бонус могут получить только те пользователи, которые майнят (добывают автоматически) более 50 монет в секунду`);
  4. if(message.user.one.bonustime > getUnix()) return bot(`cледующий бонус через: ${unixStampLeft(message.user.one.bonustime - Date.now())}` {
  5. keyboard:JSON.stringify(
  6. {
  7. "one_time": false,
  8. "buttons": [
  9. [
  10. {
  11. "action": {
  12. "type": "text",
  13. "payload": "{\"button\": \"1\"}",
  14. "label": "Ежедневный Бонус"
  15. },
  16. "color": "positive"
  17. }
  18. ],
  19. [
  20. {
  21. "action": {
  22. "type": "text",
  23. "payload": "{\"button\": \"1\"}",
  24. "label": "Бонус #1"
  25. },
  26. "color": "primary"
  27. },
  28. {
  29. "action": {
  30. "type": "text",
  31. "payload": "{\"button\": \"1\"}",
  32. "label": "Бонус #2"
  33. },
  34. "color": "primary"
  35. },
  36. {
  37. "action": {
  38. "type": "text",
  39. "payload": "{\"button\": \"1\"}",
  40. "label": "Бонус #3"
  41. },
  42. "color": "primary"
  43. }
  44. ],
  45. [
  46. {
  47. "action": {
  48. "type": "text",
  49. "payload": "{\"button\": \"1\"}",
  50. "label": "Бонус #4"
  51. },
  52. "color": "default"
  53. },
  54. {
  55. "action": {
  56. "type": "text",
  57. "payload": "{\"button\": \"1\"}",
  58. "label": "Бонус #5"
  59. },
  60. "color": "default"
  61. },
  62. {
  63. "action": {
  64. "type": "text",
  65. "payload": "{\"button\": \"1\"}",
  66. "label": "Бонус #6"
  67. },
  68. "color": "positive"
  69. }
  70. ],
  71. [
  72. {
  73. "action": {
  74. "type": "text",
  75. "payload": "{\"button\": \"1\"}",
  76. "label": "Назад"
  77. },
  78. "color": "negative"
  79. }
  80. ]
  81. ]
  82. }
  83. }
  84.  
  85. setTimeout(() => {
  86. message.user.one.bonus = false;
  87.  
  88. }, 86400000);
  89.  
  90. message.user.one.bonus = true;
  91.  
  92. message.user.balance += test;
  93.  
  94. message.user.one.bonustime = getUnix() + 86400000;
  95. return bot(`Бонус получен в размере: ${test} монет.\n\nСледующий бонус через 24 часа!`,
  96.  
  97. {
  98. keyboard:JSON.stringify(
  99. {
  100. "one_time": false,
  101. "buttons": [
  102. [
  103. {
  104. "action": {
  105. "type": "text",
  106. "payload": "{\"button\": \"1\"}",
  107. "label": "Клик"
  108. },
  109. "color": "primary"
  110. }
  111. ],
  112. [
  113. {
  114. "action": {
  115. "type": "text",
  116. "payload": "{\"button\": \"4\"}",
  117. "label": "Баланс"
  118. },
  119. "color": "positive"
  120. },
  121. {
  122. "action": {
  123. "type": "text",
  124. "payload": "{\"button\": \"1\"}",
  125. "label": "Помощь"
  126. },
  127. "color": "positive"
  128. }
  129. ],
  130. [
  131. {
  132. "action": {
  133. "type": "text",
  134. "payload": "{\"button\": \"1\"}",
  135. "label": "Ускорители"
  136. },
  137. "color": "default"
  138. },
  139. {
  140. "action": {
  141. "type": "text",
  142. "payload": "{\"button\": \"1\"}",
  143. "label": "Топ"
  144. },
  145. "color": "default"
  146. }
  147. ],
  148. [
  149. {
  150. "action": {
  151. "type": "text",
  152. "payload": "{\"button\": \"1\"}",
  153. "label": "Вывод"
  154. },
  155. "color": "negative"
  156. },
  157. {
  158. "action": {
  159. "type": "text",
  160. "payload": "{\"button\": \"1\"}",
  161. "label": "Бонусы"
  162. },
  163. "color": "primary"
  164. },
  165. {
  166. "action": {
  167. "type": "text",
  168. "payload": "{\"button\": \"1\"}",
  169. "label": "Ввод"
  170. },
  171. "color": "negative"
  172. }
  173.  
  174. ]
  175. ]
  176. })
  177. });
  178. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement