Browse Source

working bot

master
f0x 1 year ago
commit
2eb5e6df76
5 changed files with 778 additions and 0 deletions
  1. 2
    0
      .gitignore
  2. 150
    0
      app.js
  3. 1
    0
      bot-token.js
  4. 21
    0
      package.json
  5. 604
    0
      shrinkwrap.yaml

+ 2
- 0
.gitignore View File

@@ -0,0 +1,2 @@
1
+bot-token.js
2
+node_modules

+ 150
- 0
app.js View File

@@ -0,0 +1,150 @@
1
+const token = require('./bot-token.js')
2
+if (token == "BOT_TOKEN_HERE") {
3
+  console.log("get a bot token through @botfather first, and edit bot-token.js\n")
4
+  return
5
+}
6
+const TelegramBot = require('node-telegram-bot-api')
7
+const defaultValue = require('default-value')
8
+const cron = require('node-cron')
9
+
10
+const bot = new TelegramBot(token, {polling: true})
11
+
12
+let database = {}
13
+
14
+cron.schedule('30 * * * *', () => { //Runs every 30 minutes
15
+  Object.keys(database).forEach((chatID) => {
16
+    let chat = database[chatID]
17
+    Object.keys(chat.members).forEach((member) => {
18
+      member.age++
19
+    })
20
+  })
21
+})
22
+
23
+bot.on('new_chat_members', (event) => {
24
+  const chatID = event.chat.id
25
+  database[chatID] = defaultValue(database[chatID], {})
26
+  database[chatID]["members"] = defaultValue(database[chatID]["members"], {})
27
+  let newMembers = ""
28
+  event.new_chat_members.forEach((newMember) => {
29
+    database[chatID]["members"][newMember.id] = {age: 0}
30
+    newMembers += getName(newMember) + ", "
31
+  })
32
+  console.log("learned existence of: " + newMembers)
33
+})
34
+
35
+bot.on('message', (event) => {
36
+  const chatID = event.chat.id
37
+  database[chatID] = defaultValue(database[chatID], {})
38
+  database[chatID]["members"] = defaultValue(database[chatID]["members"], {})
39
+
40
+  if(database[chatID]["members"][event.from.id] == null) {
41
+    database[chatID]["members"][event.from.id] = {age: 0}
42
+    console.log("learned existence of: " + getName(event.from))
43
+  }
44
+
45
+  if(event.text == undefined) {
46
+    return
47
+  }
48
+
49
+  if(event.text.startsWith("/vote") || event.text.startsWith("/vote@kropotkinbot")) {
50
+    if(event.reply_to_message == null) {
51
+      bot.sendMessage(chatID, "Reply to the person you want to vote on", {reply_to_message_id: event.message_id})
52
+      return
53
+    }
54
+
55
+    //if(database[chatID]["members"][event.from.id].age < 10) { //member is too young
56
+    //  bot.sendMessage(chatID, "You need to be around for a bit longer before you can do that", {reply_to_message_id: event.message_id})
57
+    //  return
58
+    //}
59
+
60
+
61
+    let voteObject = {
62
+      text: "Voting to mute " + getName(event.reply_to_message.from),
63
+      candidate: {
64
+        id: event.reply_to_message.from.id,
65
+        name: getName(event.reply_to_message.from)
66
+      },
67
+      voters: {}
68
+    }
69
+
70
+    database[chatID]["votes"] = defaultValue(database[chatID]["votes"], {})
71
+    database[chatID]["votes"][event.message_id] = voteObject
72
+    let message = voteMessage(voteObject)
73
+
74
+    let options = {
75
+      reply_to_message_id: event.message_id,
76
+      reply_markup: message[1]
77
+    }
78
+
79
+    bot.sendMessage(chatID, message[0], options).then((msg) => {
80
+      console.log("Successfully started new poll")
81
+      bot.getChat(chatID).then((chat) => {
82
+        if (chat.pinned_message != null) {
83
+          database[chatID]["pin"] = chat.pinned_message.message_id
84
+        }
85
+        bot.pinChatMessage(chatID, msg.message_id) //pin poll
86
+      })
87
+    })
88
+  }
89
+})
90
+
91
+function voteMessage(voteObject) {
92
+  let votes = Object.keys(voteObject.voters).length
93
+  let keyboard = JSON.stringify({
94
+    inline_keyboard: [[
95
+      {
96
+        text: "👍 "+votes,
97
+        callback_data: "vote"
98
+      }
99
+    ]]
100
+  })
101
+  return [voteObject.text, keyboard, votes]
102
+}
103
+
104
+bot.on('callback_query', (event) => {
105
+  let chatID = event.message.chat.id
106
+  console.log("vote in", chatID)
107
+  console.log("Database:", database)
108
+  console.log("as a reply to vote #", event.message.message_id)
109
+  let voteObject = database[chatID]["votes"][event.message.reply_to_message.message_id]
110
+  if (voteObject.voters[event.from.id] == null) {
111
+    voteObject.voters[event.from.id] = 1
112
+  } else {
113
+    delete voteObject.voters[event.from.id]
114
+  }
115
+  let message = voteMessage(voteObject)
116
+  let options = {
117
+    chat_id: chatID,
118
+    message_id: event.message.message_id,
119
+    reply_markup: message[1]
120
+  }
121
+
122
+  bot.editMessageText(message[0], options)
123
+
124
+  if (message[2] > 0) { // enough votes to take action
125
+    bot.sendMessage(chatID, "Muted " + voteObject.candidate.name)
126
+    //mute user
127
+    bot.restrictChatMember(chatID, voteObject.candidate.id, {can_send_messages: false})
128
+
129
+    //restore or remove pinned message
130
+    if (database[chatID]["pin"] != null) {
131
+      //restore
132
+      bot.pinChatMessage(chatID, database[chatID]["pin"])
133
+      return
134
+    }
135
+    bot.unpinChatMessage(chatID)
136
+  }
137
+})
138
+
139
+bot.on('polling_error', (error) => {
140
+  console.warn(error)
141
+})
142
+
143
+function getName(user) {
144
+  let name = user.first_name
145
+  if(user.username != null) {
146
+    name = "@" + user.username
147
+  }
148
+  name += "‭" // Append LTR character
149
+  return name
150
+}

+ 1
- 0
bot-token.js View File

@@ -0,0 +1 @@
1
+module.exports = 'BOT_TOKEN_HERE'

+ 21
- 0
package.json View File

@@ -0,0 +1,21 @@
1
+{
2
+  "name": "krobotkin",
3
+  "version": "1.0.0",
4
+  "description": "Telegram bot for vote mute/kick/ban",
5
+  "main": "app.js",
6
+  "scripts": {
7
+    "start": "node app.js",
8
+    "test": "echo \"Error: no test specified\" && exit 1"
9
+  },
10
+  "repository": {
11
+    "type": "git",
12
+    "url": "https://git.lain.haus/f0x/krobotkin"
13
+  },
14
+  "author": "f0x",
15
+  "license": "AGPL-3.0",
16
+  "dependencies": {
17
+    "default-value": "^1.0.0",
18
+    "node-cron": "^2.0.3",
19
+    "node-telegram-bot-api": "^0.30.0"
20
+  }
21
+}

+ 604
- 0
shrinkwrap.yaml View File

@@ -0,0 +1,604 @@
1
+dependencies:
2
+  default-value: 1.0.0
3
+  node-cron: 2.0.3
4
+  node-telegram-bot-api: 0.30.0
5
+packages:
6
+  /ajv/6.5.5:
7
+    dependencies:
8
+      fast-deep-equal: 2.0.1
9
+      fast-json-stable-stringify: 2.0.0
10
+      json-schema-traverse: 0.4.1
11
+      uri-js: 4.2.2
12
+    dev: false
13
+    resolution:
14
+      integrity: sha512-7q7gtRQDJSyuEHjuVgHoUa2VuemFiCMrfQc9Tc08XTAc4Zj/5U1buQJ0HU6i7fKjXU09SVgSmxa4sLvuvS8Iyg==
15
+  /array.prototype.findindex/2.0.2:
16
+    dependencies:
17
+      define-properties: 1.1.3
18
+      es-abstract: 1.12.0
19
+    dev: false
20
+    resolution:
21
+      integrity: sha1-WAaNJYh+9QXknckssAxE3O5VsGc=
22
+  /asn1/0.2.4:
23
+    dependencies:
24
+      safer-buffer: 2.1.2
25
+    dev: false
26
+    resolution:
27
+      integrity: sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==
28
+  /assert-plus/1.0.0:
29
+    dev: false
30
+    engines:
31
+      node: '>=0.8'
32
+    resolution:
33
+      integrity: sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=
34
+  /asynckit/0.4.0:
35
+    dev: false
36
+    resolution:
37
+      integrity: sha1-x57Zf380y48robyXkLzDZkdLS3k=
38
+  /aws-sign2/0.7.0:
39
+    dev: false
40
+    resolution:
41
+      integrity: sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=
42
+  /aws4/1.8.0:
43
+    dev: false
44
+    resolution:
45
+      integrity: sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==
46
+  /bcrypt-pbkdf/1.0.2:
47
+    dependencies:
48
+      tweetnacl: 0.14.5
49
+    dev: false
50
+    resolution:
51
+      integrity: sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=
52
+  /bl/1.2.2:
53
+    dependencies:
54
+      readable-stream: 2.3.6
55
+      safe-buffer: 5.1.2
56
+    dev: false
57
+    resolution:
58
+      integrity: sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==
59
+      tarball: 'http://registry.npmjs.org/bl/-/bl-1.2.2.tgz'
60
+  /bluebird/3.5.3:
61
+    dev: false
62
+    resolution:
63
+      integrity: sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw==
64
+  /caseless/0.12.0:
65
+    dev: false
66
+    resolution:
67
+      integrity: sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=
68
+  /combined-stream/1.0.7:
69
+    dependencies:
70
+      delayed-stream: 1.0.0
71
+    dev: false
72
+    engines:
73
+      node: '>= 0.8'
74
+    resolution:
75
+      integrity: sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==
76
+  /core-util-is/1.0.2:
77
+    dev: false
78
+    resolution:
79
+      integrity: sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
80
+  /dashdash/1.14.1:
81
+    dependencies:
82
+      assert-plus: 1.0.0
83
+    dev: false
84
+    engines:
85
+      node: '>=0.10'
86
+    resolution:
87
+      integrity: sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=
88
+  /debug/3.2.6:
89
+    dependencies:
90
+      ms: 2.1.1
91
+    dev: false
92
+    resolution:
93
+      integrity: sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==
94
+  /default-value/1.0.0:
95
+    dependencies:
96
+      es6-promise-try: 0.0.1
97
+    dev: false
98
+    resolution:
99
+      integrity: sha1-jG9SpaEZP+eP3J+G63HRbJdXyDo=
100
+  /define-properties/1.1.3:
101
+    dependencies:
102
+      object-keys: 1.0.12
103
+    dev: false
104
+    engines:
105
+      node: '>= 0.4'
106
+    resolution:
107
+      integrity: sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==
108
+  /delayed-stream/1.0.0:
109
+    dev: false
110
+    engines:
111
+      node: '>=0.4.0'
112
+    resolution:
113
+      integrity: sha1-3zrhmayt+31ECqrgsp4icrJOxhk=
114
+  /depd/1.1.2:
115
+    dev: false
116
+    engines:
117
+      node: '>= 0.6'
118
+    resolution:
119
+      integrity: sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=
120
+  /ecc-jsbn/0.1.2:
121
+    dependencies:
122
+      jsbn: 0.1.1
123
+      safer-buffer: 2.1.2
124
+    dev: false
125
+    resolution:
126
+      integrity: sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=
127
+  /end-of-stream/1.4.1:
128
+    dependencies:
129
+      once: 1.4.0
130
+    dev: false
131
+    resolution:
132
+      integrity: sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==
133
+  /es-abstract/1.12.0:
134
+    dependencies:
135
+      es-to-primitive: 1.2.0
136
+      function-bind: 1.1.1
137
+      has: 1.0.3
138
+      is-callable: 1.1.4
139
+      is-regex: 1.0.4
140
+    dev: false
141
+    engines:
142
+      node: '>= 0.4'
143
+    resolution:
144
+      integrity: sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==
145
+  /es-to-primitive/1.2.0:
146
+    dependencies:
147
+      is-callable: 1.1.4
148
+      is-date-object: 1.0.1
149
+      is-symbol: 1.0.2
150
+    dev: false
151
+    engines:
152
+      node: '>= 0.4'
153
+    resolution:
154
+      integrity: sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==
155
+  /es6-promise-try/0.0.1:
156
+    dev: false
157
+    resolution:
158
+      integrity: sha1-EPFA2tJ0Wc75SZc+XSGgh/cnSyA=
159
+  /eventemitter3/3.1.0:
160
+    dev: false
161
+    resolution:
162
+      integrity: sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==
163
+  /extend/3.0.2:
164
+    dev: false
165
+    resolution:
166
+      integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==
167
+  /extsprintf/1.3.0:
168
+    dev: false
169
+    engines:
170
+      '0': node >=0.6.0
171
+    resolution:
172
+      integrity: sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=
173
+  /extsprintf/1.4.0:
174
+    dev: false
175
+    engines:
176
+      '0': node >=0.6.0
177
+    resolution:
178
+      integrity: sha1-4mifjzVvrWLMplo6kcXfX5VRaS8=
179
+  /fast-deep-equal/2.0.1:
180
+    dev: false
181
+    resolution:
182
+      integrity: sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=
183
+  /fast-json-stable-stringify/2.0.0:
184
+    dev: false
185
+    resolution:
186
+      integrity: sha1-1RQsDK7msRifh9OnYREGT4bIu/I=
187
+  /file-type/3.9.0:
188
+    dev: false
189
+    engines:
190
+      node: '>=0.10.0'
191
+    resolution:
192
+      integrity: sha1-JXoHg4TR24CHvESdEH1SpSZyuek=
193
+      tarball: 'http://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz'
194
+  /forever-agent/0.6.1:
195
+    dev: false
196
+    resolution:
197
+      integrity: sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=
198
+  /form-data/2.3.3:
199
+    dependencies:
200
+      asynckit: 0.4.0
201
+      combined-stream: 1.0.7
202
+      mime-types: 2.1.21
203
+    dev: false
204
+    engines:
205
+      node: '>= 0.12'
206
+    resolution:
207
+      integrity: sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==
208
+  /function-bind/1.1.1:
209
+    dev: false
210
+    resolution:
211
+      integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
212
+  /getpass/0.1.7:
213
+    dependencies:
214
+      assert-plus: 1.0.0
215
+    dev: false
216
+    resolution:
217
+      integrity: sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=
218
+  /har-schema/2.0.0:
219
+    dev: false
220
+    engines:
221
+      node: '>=4'
222
+    resolution:
223
+      integrity: sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=
224
+  /har-validator/5.1.3:
225
+    dependencies:
226
+      ajv: 6.5.5
227
+      har-schema: 2.0.0
228
+    dev: false
229
+    engines:
230
+      node: '>=6'
231
+    resolution:
232
+      integrity: sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==
233
+  /has-symbols/1.0.0:
234
+    dev: false
235
+    engines:
236
+      node: '>= 0.4'
237
+    resolution:
238
+      integrity: sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=
239
+  /has/1.0.3:
240
+    dependencies:
241
+      function-bind: 1.1.1
242
+    dev: false
243
+    engines:
244
+      node: '>= 0.4.0'
245
+    resolution:
246
+      integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==
247
+  /http-signature/1.2.0:
248
+    dependencies:
249
+      assert-plus: 1.0.0
250
+      jsprim: 1.4.1
251
+      sshpk: 1.15.2
252
+    dev: false
253
+    engines:
254
+      node: '>=0.8'
255
+      npm: '>=1.3.7'
256
+    resolution:
257
+      integrity: sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=
258
+  /inherits/2.0.3:
259
+    dev: false
260
+    resolution:
261
+      integrity: sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
262
+  /is-callable/1.1.4:
263
+    dev: false
264
+    engines:
265
+      node: '>= 0.4'
266
+    resolution:
267
+      integrity: sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==
268
+  /is-date-object/1.0.1:
269
+    dev: false
270
+    engines:
271
+      node: '>= 0.4'
272
+    resolution:
273
+      integrity: sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=
274
+  /is-regex/1.0.4:
275
+    dependencies:
276
+      has: 1.0.3
277
+    dev: false
278
+    engines:
279
+      node: '>= 0.4'
280
+    resolution:
281
+      integrity: sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=
282
+  /is-symbol/1.0.2:
283
+    dependencies:
284
+      has-symbols: 1.0.0
285
+    dev: false
286
+    engines:
287
+      node: '>= 0.4'
288
+    resolution:
289
+      integrity: sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==
290
+  /is-typedarray/1.0.0:
291
+    dev: false
292
+    resolution:
293
+      integrity: sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=
294
+  /isarray/1.0.0:
295
+    dev: false
296
+    resolution:
297
+      integrity: sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
298
+  /isstream/0.1.2:
299
+    dev: false
300
+    resolution:
301
+      integrity: sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=
302
+  /jsbn/0.1.1:
303
+    dev: false
304
+    resolution:
305
+      integrity: sha1-peZUwuWi3rXyAdls77yoDA7y9RM=
306
+  /json-schema-traverse/0.4.1:
307
+    dev: false
308
+    resolution:
309
+      integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==
310
+  /json-schema/0.2.3:
311
+    dev: false
312
+    resolution:
313
+      integrity: sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=
314
+  /json-stringify-safe/5.0.1:
315
+    dev: false
316
+    resolution:
317
+      integrity: sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=
318
+  /jsprim/1.4.1:
319
+    dependencies:
320
+      assert-plus: 1.0.0
321
+      extsprintf: 1.3.0
322
+      json-schema: 0.2.3
323
+      verror: 1.10.0
324
+    dev: false
325
+    engines:
326
+      '0': node >=0.6.0
327
+    resolution:
328
+      integrity: sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=
329
+  /lodash/4.17.11:
330
+    dev: false
331
+    resolution:
332
+      integrity: sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==
333
+  /mime-db/1.37.0:
334
+    dev: false
335
+    engines:
336
+      node: '>= 0.6'
337
+    resolution:
338
+      integrity: sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==
339
+  /mime-types/2.1.21:
340
+    dependencies:
341
+      mime-db: 1.37.0
342
+    dev: false
343
+    engines:
344
+      node: '>= 0.6'
345
+    resolution:
346
+      integrity: sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==
347
+  /mime/1.6.0:
348
+    dev: false
349
+    engines:
350
+      node: '>=4'
351
+    hasBin: true
352
+    resolution:
353
+      integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==
354
+  /ms/2.1.1:
355
+    dev: false
356
+    resolution:
357
+      integrity: sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==
358
+  /node-cron/2.0.3:
359
+    dependencies:
360
+      opencollective-postinstall: 2.0.1
361
+      tz-offset: 0.0.1
362
+    dev: false
363
+    engines:
364
+      node: '>=6.0.0'
365
+    requiresBuild: true
366
+    resolution:
367
+      integrity: sha512-eJI+QitXlwcgiZwNNSRbqsjeZMp5shyajMR81RZCqeW0ZDEj4zU9tpd4nTh/1JsBiKbF8d08FCewiipDmVIYjg==
368
+  /node-telegram-bot-api/0.30.0:
369
+    dependencies:
370
+      array.prototype.findindex: 2.0.2
371
+      bl: 1.2.2
372
+      bluebird: 3.5.3
373
+      debug: 3.2.6
374
+      depd: 1.1.2
375
+      eventemitter3: 3.1.0
376
+      file-type: 3.9.0
377
+      mime: 1.6.0
378
+      pump: 2.0.1
379
+      request: 2.88.0
380
+      request-promise: /request-promise/4.2.2/request@2.88.0
381
+    dev: false
382
+    engines:
383
+      node: '>=0.12'
384
+    resolution:
385
+      integrity: sha512-+EeM+fe3Xt81KIPqN3L6s6eK+FK4QaqyDcwCwkY/jqsleERXwwjGlVbf4lJCOZ0uJuF5PfqTmvVNtua7AZfBXg==
386
+  /oauth-sign/0.9.0:
387
+    dev: false
388
+    resolution:
389
+      integrity: sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==
390
+  /object-keys/1.0.12:
391
+    dev: false
392
+    engines:
393
+      node: '>= 0.4'
394
+    resolution:
395
+      integrity: sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==
396
+  /once/1.4.0:
397
+    dependencies:
398
+      wrappy: 1.0.2
399
+    dev: false
400
+    resolution:
401
+      integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
402
+  /opencollective-postinstall/2.0.1:
403
+    dev: false
404
+    hasBin: true
405
+    resolution:
406
+      integrity: sha512-saQQ9hjLwu/oS0492eyYotoh+bra1819cfAT5rjY/e4REWwuc8IgZ844Oo44SiftWcJuBiqp0SA0BFVbmLX0IQ==
407
+  /performance-now/2.1.0:
408
+    dev: false
409
+    resolution:
410
+      integrity: sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
411
+  /process-nextick-args/2.0.0:
412
+    dev: false
413
+    resolution:
414
+      integrity: sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==
415
+  /psl/1.1.29:
416
+    dev: false
417
+    resolution:
418
+      integrity: sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==
419
+  /pump/2.0.1:
420
+    dependencies:
421
+      end-of-stream: 1.4.1
422
+      once: 1.4.0
423
+    dev: false
424
+    resolution:
425
+      integrity: sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==
426
+  /punycode/1.4.1:
427
+    dev: false
428
+    resolution:
429
+      integrity: sha1-wNWmOycYgArY4esPpSachN1BhF4=
430
+  /punycode/2.1.1:
431
+    dev: false
432
+    engines:
433
+      node: '>=6'
434
+    resolution:
435
+      integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
436
+  /qs/6.5.2:
437
+    dev: false
438
+    engines:
439
+      node: '>=0.6'
440
+    resolution:
441
+      integrity: sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==
442
+  /readable-stream/2.3.6:
443
+    dependencies:
444
+      core-util-is: 1.0.2
445
+      inherits: 2.0.3
446
+      isarray: 1.0.0
447
+      process-nextick-args: 2.0.0
448
+      safe-buffer: 5.1.2
449
+      string_decoder: 1.1.1
450
+      util-deprecate: 1.0.2
451
+    dev: false
452
+    resolution:
453
+      integrity: sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==
454
+      tarball: 'http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz'
455
+  /request-promise-core/1.1.1/request@2.88.0:
456
+    dependencies:
457
+      lodash: 4.17.11
458
+      request: 2.88.0
459
+    dev: false
460
+    engines:
461
+      node: '>=0.10.0'
462
+    id: registry.npmjs.org/request-promise-core/1.1.1
463
+    peerDependencies:
464
+      request: ^2.34
465
+    resolution:
466
+      integrity: sha1-Pu4AssWqgyOc+wTFcA2jb4HNCLY=
467
+  /request-promise/4.2.2/request@2.88.0:
468
+    dependencies:
469
+      bluebird: 3.5.3
470
+      request: 2.88.0
471
+      request-promise-core: /request-promise-core/1.1.1/request@2.88.0
472
+      stealthy-require: 1.1.1
473
+      tough-cookie: 2.4.3
474
+    dev: false
475
+    engines:
476
+      node: '>=0.10.0'
477
+    id: registry.npmjs.org/request-promise/4.2.2
478
+    peerDependencies:
479
+      request: ^2.34
480
+    resolution:
481
+      integrity: sha1-0epG1lSm7k+O5qT+oQGMIpEZBLQ=
482
+  /request/2.88.0:
483
+    dependencies:
484
+      aws-sign2: 0.7.0
485
+      aws4: 1.8.0
486
+      caseless: 0.12.0
487
+      combined-stream: 1.0.7
488
+      extend: 3.0.2
489
+      forever-agent: 0.6.1
490
+      form-data: 2.3.3
491
+      har-validator: 5.1.3
492
+      http-signature: 1.2.0
493
+      is-typedarray: 1.0.0
494
+      isstream: 0.1.2
495
+      json-stringify-safe: 5.0.1
496
+      mime-types: 2.1.21
497
+      oauth-sign: 0.9.0
498
+      performance-now: 2.1.0
499
+      qs: 6.5.2
500
+      safe-buffer: 5.1.2
501
+      tough-cookie: 2.4.3
502
+      tunnel-agent: 0.6.0
503
+      uuid: 3.3.2
504
+    dev: false
505
+    engines:
506
+      node: '>= 4'
507
+    resolution:
508
+      integrity: sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==
509
+  /safe-buffer/5.1.2:
510
+    dev: false
511
+    resolution:
512
+      integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
513
+  /safer-buffer/2.1.2:
514
+    dev: false
515
+    resolution:
516
+      integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
517
+  /sshpk/1.15.2:
518
+    dependencies:
519
+      asn1: 0.2.4
520
+      assert-plus: 1.0.0
521
+      bcrypt-pbkdf: 1.0.2
522
+      dashdash: 1.14.1
523
+      ecc-jsbn: 0.1.2
524
+      getpass: 0.1.7
525
+      jsbn: 0.1.1
526
+      safer-buffer: 2.1.2
527
+      tweetnacl: 0.14.5
528
+    dev: false
529
+    engines:
530
+      node: '>=0.10.0'
531
+    hasBin: true
532
+    resolution:
533
+      integrity: sha512-Ra/OXQtuh0/enyl4ETZAfTaeksa6BXks5ZcjpSUNrjBr0DvrJKX+1fsKDPpT9TBXgHAFsa4510aNVgI8g/+SzA==
534
+  /stealthy-require/1.1.1:
535
+    dev: false
536
+    engines:
537
+      node: '>=0.10.0'
538
+    resolution:
539
+      integrity: sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=
540
+  /string_decoder/1.1.1:
541
+    dependencies:
542
+      safe-buffer: 5.1.2
543
+    dev: false
544
+    resolution:
545
+      integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==
546
+  /tough-cookie/2.4.3:
547
+    dependencies:
548
+      psl: 1.1.29
549
+      punycode: 1.4.1
550
+    dev: false
551
+    engines:
552
+      node: '>=0.8'
553
+    resolution:
554
+      integrity: sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==
555
+  /tunnel-agent/0.6.0:
556
+    dependencies:
557
+      safe-buffer: 5.1.2
558
+    dev: false
559
+    resolution:
560
+      integrity: sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=
561
+  /tweetnacl/0.14.5:
562
+    dev: false
563
+    resolution:
564
+      integrity: sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=
565
+  /tz-offset/0.0.1:
566
+    dev: false
567
+    resolution:
568
+      integrity: sha512-kMBmblijHJXyOpKzgDhKx9INYU4u4E1RPMB0HqmKSgWG8vEcf3exEfLh4FFfzd3xdQOw9EuIy/cP0akY6rHopQ==
569
+  /uri-js/4.2.2:
570
+    dependencies:
571
+      punycode: 2.1.1
572
+    dev: false
573
+    resolution:
574
+      integrity: sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==
575
+  /util-deprecate/1.0.2:
576
+    dev: false
577
+    resolution:
578
+      integrity: sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
579
+  /uuid/3.3.2:
580
+    dev: false
581
+    hasBin: true
582
+    resolution:
583
+      integrity: sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==
584
+  /verror/1.10.0:
585
+    dependencies:
586
+      assert-plus: 1.0.0
587
+      core-util-is: 1.0.2
588
+      extsprintf: 1.4.0
589
+    dev: false
590
+    engines:
591
+      '0': node >=0.6.0
592
+    resolution:
593
+      integrity: sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=
594
+  /wrappy/1.0.2:
595
+    dev: false
596
+    resolution:
597
+      integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
598
+registry: 'https://registry.npmjs.org/'
599
+shrinkwrapMinorVersion: 9
600
+shrinkwrapVersion: 3
601
+specifiers:
602
+  default-value: ^1.0.0
603
+  node-cron: ^2.0.3
604
+  node-telegram-bot-api: ^0.30.0

Loading…
Cancel
Save