Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cmd.hear(/^(?:бонус #1)$/i, async (message, bot) => {
- const test = 50000 //рандом
- if(message.user.auto < 51) return bot(`Бонус могут получить только те пользователи, которые майнят (добывают автоматически) более 50 монет в секунду`);
- if(message.user.one.bonustime > getUnix()) return bot(`cледующий бонус через: ${unixStampLeft(message.user.one.bonustime - Date.now())}` {
- keyboard:JSON.stringify(
- {
- "one_time": false,
- "buttons": [
- [
- {
- "action": {
- "type": "text",
- "payload": "{\"button\": \"1\"}",
- "label": "Ежедневный Бонус"
- },
- "color": "positive"
- }
- ],
- [
- {
- "action": {
- "type": "text",
- "payload": "{\"button\": \"1\"}",
- "label": "Бонус #1"
- },
- "color": "primary"
- },
- {
- "action": {
- "type": "text",
- "payload": "{\"button\": \"1\"}",
- "label": "Бонус #2"
- },
- "color": "primary"
- },
- {
- "action": {
- "type": "text",
- "payload": "{\"button\": \"1\"}",
- "label": "Бонус #3"
- },
- "color": "primary"
- }
- ],
- [
- {
- "action": {
- "type": "text",
- "payload": "{\"button\": \"1\"}",
- "label": "Бонус #4"
- },
- "color": "default"
- },
- {
- "action": {
- "type": "text",
- "payload": "{\"button\": \"1\"}",
- "label": "Бонус #5"
- },
- "color": "default"
- },
- {
- "action": {
- "type": "text",
- "payload": "{\"button\": \"1\"}",
- "label": "Бонус #6"
- },
- "color": "positive"
- }
- ],
- [
- {
- "action": {
- "type": "text",
- "payload": "{\"button\": \"1\"}",
- "label": "Назад"
- },
- "color": "negative"
- }
- ]
- ]
- }
- }
- setTimeout(() => {
- message.user.one.bonus = false;
- }, 86400000);
- message.user.one.bonus = true;
- message.user.balance += test;
- message.user.one.bonustime = getUnix() + 86400000;
- return bot(`Бонус получен в размере: ${test} монет.\n\nСледующий бонус через 24 часа!`,
- {
- keyboard:JSON.stringify(
- {
- "one_time": false,
- "buttons": [
- [
- {
- "action": {
- "type": "text",
- "payload": "{\"button\": \"1\"}",
- "label": "Клик"
- },
- "color": "primary"
- }
- ],
- [
- {
- "action": {
- "type": "text",
- "payload": "{\"button\": \"4\"}",
- "label": "Баланс"
- },
- "color": "positive"
- },
- {
- "action": {
- "type": "text",
- "payload": "{\"button\": \"1\"}",
- "label": "Помощь"
- },
- "color": "positive"
- }
- ],
- [
- {
- "action": {
- "type": "text",
- "payload": "{\"button\": \"1\"}",
- "label": "Ускорители"
- },
- "color": "default"
- },
- {
- "action": {
- "type": "text",
- "payload": "{\"button\": \"1\"}",
- "label": "Топ"
- },
- "color": "default"
- }
- ],
- [
- {
- "action": {
- "type": "text",
- "payload": "{\"button\": \"1\"}",
- "label": "Вывод"
- },
- "color": "negative"
- },
- {
- "action": {
- "type": "text",
- "payload": "{\"button\": \"1\"}",
- "label": "Бонусы"
- },
- "color": "primary"
- },
- {
- "action": {
- "type": "text",
- "payload": "{\"button\": \"1\"}",
- "label": "Ввод"
- },
- "color": "negative"
- }
- ]
- ]
- })
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement