Skip to content

Commit b3baa99

Browse files
committed
fix: Remove unnecessary webhook deletion and getUpdates calls in CopBot class.
1 parent 2b25d8a commit b3baa99

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/bot/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,13 @@ export class CopBot {
7373
});
7474
await this._bot.api.setWebhook(`${web_hook}`);
7575
console.log(`Webhook set successfully to: ${web_hook}`);
76-
await this._bot.api.getUpdates({ offset: -1 });
7776
await this._bot.start({
7877
onStart: (botInfo) => {
7978
console.log(`Bot started in Webhook mode! Username: ${botInfo.username}`);
8079
},
8180
});
8281
} else {
8382
try {
84-
await this._bot.api.deleteWebhook();
85-
await this._bot.api.getUpdates({ offset: -1 });
8683
await this._bot.start({
8784
onStart: (botInfo) => {
8885
console.log(`Bot started in long-polling mode! Username: ${botInfo.username}`);

0 commit comments

Comments
 (0)