From 2bfcf6f75dbb0e435a823a72e47942249aeef74f Mon Sep 17 00:00:00 2001 From: lukas Date: Wed, 20 Mar 2024 17:12:36 +0100 Subject: [PATCH] chore: Update telegraf --- package-lock.json | 46 +++++++++---------- package.json | 2 +- .../telegram/response/already-registered.ts | 4 +- src/lib/telegram/response/auth-pending.ts | 4 +- src/lib/telegram/response/unauthorized.ts | 4 +- src/lib/telegram/response/unknown-wallet.ts | 4 +- .../telegram/response/wrong-param-count.ts | 5 +- 7 files changed, 30 insertions(+), 39 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6610fde3..a1a25272 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "pg": "^8.11.3", "pretty-error": "^4.0.0", "superagent": "^8.1.2", - "telegraf": "^4.15.3", + "telegraf": "^4.16.3", "typeorm": "^0.3.20", "winston": "^3.12.0" }, @@ -1966,9 +1966,9 @@ } }, "node_modules/@telegraf/types": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/@telegraf/types/-/types-6.9.1.tgz", - "integrity": "sha512-bzqwhicZq401T0e09tu8b1KvGfJObPmzKU/iKCT5V466AsAZZWQrBYQ5edbmD1VZuHLEwopoOVY5wPP4HaLtug==" + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@telegraf/types/-/types-7.1.0.tgz", + "integrity": "sha512-kGevOIbpMcIlCDeorKGpwZmdH7kHbqlk/Yj6dEpJMKEQw5lk0KVQY0OLXaCswy8GqlIVLd5625OB+rAntP9xVw==" }, "node_modules/@tsconfig/node10": { "version": "1.0.9", @@ -8270,15 +8270,15 @@ } }, "node_modules/telegraf": { - "version": "4.15.3", - "resolved": "https://registry.npmjs.org/telegraf/-/telegraf-4.15.3.tgz", - "integrity": "sha512-pm2ZQAisd0YlUvnq6xdymDfoQR++8wTalw0nfw7Tjy0va+V/0HaBLzM8kMNid8pbbt7GHTU29lEyA5CAAr8AqA==", + "version": "4.16.3", + "resolved": "https://registry.npmjs.org/telegraf/-/telegraf-4.16.3.tgz", + "integrity": "sha512-yjEu2NwkHlXu0OARWoNhJlIjX09dRktiMQFsM678BAH/PEPVwctzL67+tvXqLCRQQvm3SDtki2saGO9hLlz68w==", "dependencies": { - "@telegraf/types": "^6.9.1", + "@telegraf/types": "^7.1.0", "abort-controller": "^3.0.0", "debug": "^4.3.4", "mri": "^1.2.0", - "node-fetch": "^2.6.8", + "node-fetch": "^2.7.0", "p-timeout": "^4.1.0", "safe-compare": "^1.1.4", "sandwich-stream": "^2.0.2" @@ -8291,9 +8291,9 @@ } }, "node_modules/telegraf/node_modules/node-fetch": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz", - "integrity": "sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -10765,9 +10765,9 @@ } }, "@telegraf/types": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/@telegraf/types/-/types-6.9.1.tgz", - "integrity": "sha512-bzqwhicZq401T0e09tu8b1KvGfJObPmzKU/iKCT5V466AsAZZWQrBYQ5edbmD1VZuHLEwopoOVY5wPP4HaLtug==" + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@telegraf/types/-/types-7.1.0.tgz", + "integrity": "sha512-kGevOIbpMcIlCDeorKGpwZmdH7kHbqlk/Yj6dEpJMKEQw5lk0KVQY0OLXaCswy8GqlIVLd5625OB+rAntP9xVw==" }, "@tsconfig/node10": { "version": "1.0.9", @@ -15493,24 +15493,24 @@ "dev": true }, "telegraf": { - "version": "4.15.3", - "resolved": "https://registry.npmjs.org/telegraf/-/telegraf-4.15.3.tgz", - "integrity": "sha512-pm2ZQAisd0YlUvnq6xdymDfoQR++8wTalw0nfw7Tjy0va+V/0HaBLzM8kMNid8pbbt7GHTU29lEyA5CAAr8AqA==", + "version": "4.16.3", + "resolved": "https://registry.npmjs.org/telegraf/-/telegraf-4.16.3.tgz", + "integrity": "sha512-yjEu2NwkHlXu0OARWoNhJlIjX09dRktiMQFsM678BAH/PEPVwctzL67+tvXqLCRQQvm3SDtki2saGO9hLlz68w==", "requires": { - "@telegraf/types": "^6.9.1", + "@telegraf/types": "^7.1.0", "abort-controller": "^3.0.0", "debug": "^4.3.4", "mri": "^1.2.0", - "node-fetch": "^2.6.8", + "node-fetch": "^2.7.0", "p-timeout": "^4.1.0", "safe-compare": "^1.1.4", "sandwich-stream": "^2.0.2" }, "dependencies": { "node-fetch": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz", - "integrity": "sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "requires": { "whatwg-url": "^5.0.0" } diff --git a/package.json b/package.json index 94d8f355..d01bb3e3 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "pg": "^8.11.3", "pretty-error": "^4.0.0", "superagent": "^8.1.2", - "telegraf": "^4.15.3", + "telegraf": "^4.16.3", "typeorm": "^0.3.20", "winston": "^3.12.0" }, diff --git a/src/lib/telegram/response/already-registered.ts b/src/lib/telegram/response/already-registered.ts index b9757513..99b9b289 100644 --- a/src/lib/telegram/response/already-registered.ts +++ b/src/lib/telegram/response/already-registered.ts @@ -2,8 +2,6 @@ import { Message } from 'telegraf/types' import { ContextMessageUpdate } from '../context-message-update' -import TextMessage = Message.TextMessage - -export const alreadyRegistered = (ctx: ContextMessageUpdate): Promise => ctx.reply(` +export const alreadyRegistered = (ctx: ContextMessageUpdate): Promise => ctx.reply(` Looks like you are already registered and ready to go! `) diff --git a/src/lib/telegram/response/auth-pending.ts b/src/lib/telegram/response/auth-pending.ts index ad520a89..e0a7395c 100644 --- a/src/lib/telegram/response/auth-pending.ts +++ b/src/lib/telegram/response/auth-pending.ts @@ -4,9 +4,7 @@ import dayjs from '../../../dayjs' import { Wallet } from '../../../db/entities' import { ContextMessageUpdate } from '../context-message-update' -import TextMessage = Message.TextMessage - -export const authPending = (ctx: ContextMessageUpdate, wallet: Wallet): Promise => { +export const authPending = (ctx: ContextMessageUpdate, wallet: Wallet): Promise => { const authExpire = dayjs().diff(wallet.authExpire, 'second') return ctx.reply(` diff --git a/src/lib/telegram/response/unauthorized.ts b/src/lib/telegram/response/unauthorized.ts index e1f486eb..ede5ef41 100644 --- a/src/lib/telegram/response/unauthorized.ts +++ b/src/lib/telegram/response/unauthorized.ts @@ -2,8 +2,6 @@ import { Message } from 'telegraf/types' import { ContextMessageUpdate } from '../context-message-update' -import TextMessage = Message.TextMessage - -export const unauthorized = (ctx: ContextMessageUpdate): Promise => ctx.reply(` +export const unauthorized = (ctx: ContextMessageUpdate): Promise => ctx.reply(` Huh, who are you? Please authorize first! `) diff --git a/src/lib/telegram/response/unknown-wallet.ts b/src/lib/telegram/response/unknown-wallet.ts index 830e2848..69ad3fe6 100644 --- a/src/lib/telegram/response/unknown-wallet.ts +++ b/src/lib/telegram/response/unknown-wallet.ts @@ -2,8 +2,6 @@ import { Message } from 'telegraf/types' import { ContextMessageUpdate } from '../context-message-update' -import TextMessage = Message.TextMessage - -export const unknownWallet = (ctx: ContextMessageUpdate): Promise => ctx.reply(` +export const unknownWallet = (ctx: ContextMessageUpdate): Promise => ctx.reply(` Could not find wallet. Please send some ATLAS first! `) diff --git a/src/lib/telegram/response/wrong-param-count.ts b/src/lib/telegram/response/wrong-param-count.ts index db4b97e8..7e44269c 100644 --- a/src/lib/telegram/response/wrong-param-count.ts +++ b/src/lib/telegram/response/wrong-param-count.ts @@ -2,6 +2,5 @@ import { Message } from 'telegraf/types' import { ContextMessageUpdate } from '../context-message-update' -import TextMessage = Message.TextMessage - -export const wrongParamCount = (ctx: ContextMessageUpdate, message: string): Promise => ctx.reply(message) +export const wrongParamCount = + (ctx: ContextMessageUpdate, message: string): Promise => ctx.reply(message)