Skip to content

Commit a5aa974

Browse files
committed
[Bugfix] start polling only after fetching username
1 parent ed0f717 commit a5aa974

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ const bot = require('./bot');
1212
bot.telegram.getMe().then((botInfo) => {
1313
bot.options.username = botInfo.username;
1414
bot.context.botInfo = botInfo;
15+
}).then(() => {
16+
bot.startPolling();
1517
});
1618

1719
bot.use(
@@ -25,5 +27,3 @@ bot.use(
2527

2628

2729
bot.catch(logError);
28-
29-
bot.startPolling();

0 commit comments

Comments
 (0)