Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

Commit ed3699d

Browse files
authored
Add option to drop pending updates on bot launch
1 parent 023bad4 commit ed3699d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

telegram/bot.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ import { initHealthRecorder } from './utils/health-recorder';
101101
try {
102102
const botInfo = await bot.telegram.getMe();
103103
console.log(`${botInfo.first_name} is running...`);
104-
await bot.launch();
104+
await bot.launch({
105+
dropPendingUpdates: true
106+
});
105107
botUptime.set(1);
106108
restartCount = 0;
107109
} catch (error) {

0 commit comments

Comments
 (0)