Commit 476a801
committed
fix(util/index): fix arg type & fn calls
Typescript compilers in newer versions complain about when
calling functions with named parameters, there is no argument
interface for the deleteMessage method in Telegraf framework
so I changed it, and there's a telegram argument with the
wrong type.
```
util/index.ts:283:20 - error TS2554: Expected 2 arguments, but got 1.
283 await telegram.deleteMessage({chat_id: channel!, message_id: Number(order.tg_channel_message1!)});
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/telegraf/typings/telegram.d.ts:317:44
317 deleteMessage(chatId: number | string, messageId: number): Promise<true>;
~~~~~~~~~~~~~~~~~
An argument for 'messageId' was not provided.
Found 1 error in util/index.ts:283
```1 parent c411bfe commit 476a801
1 file changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
230 | 229 | | |
231 | 230 | | |
232 | 231 | | |
233 | | - | |
| 232 | + | |
234 | 233 | | |
235 | | - | |
| 234 | + | |
236 | 235 | | |
237 | 236 | | |
238 | 237 | | |
| |||
261 | 260 | | |
262 | 261 | | |
263 | 262 | | |
264 | | - | |
| 263 | + | |
265 | 264 | | |
266 | 265 | | |
| 266 | + | |
| 267 | + | |
267 | 268 | | |
268 | 269 | | |
269 | 270 | | |
| |||
279 | 280 | | |
280 | 281 | | |
281 | 282 | | |
282 | | - | |
| 283 | + | |
283 | 284 | | |
284 | 285 | | |
285 | 286 | | |
| |||
0 commit comments