2
0
mirror of https://github.com/thedevs-network/the-guard-bot synced 2025-08-31 14:15:25 +00:00

[Bugfix] start polling only after fetching username

This commit is contained in:
GingerPlusPlus
2018-09-01 15:46:42 +02:00
parent ed0f717714
commit a5aa974e53

View File

@@ -12,6 +12,8 @@ const bot = require('./bot');
bot.telegram.getMe().then((botInfo) => {
bot.options.username = botInfo.username;
bot.context.botInfo = botInfo;
}).then(() => {
bot.startPolling();
});
bot.use(
@@ -25,5 +27,3 @@ bot.use(
bot.catch(logError);
bot.startPolling();