mirror of
https://github.com/thedevs-network/the-guard-bot
synced 2025-09-03 23:55:15 +00:00
[Bugfix] start polling only after fetching username
This commit is contained in:
4
index.js
4
index.js
@@ -12,6 +12,8 @@ const bot = require('./bot');
|
|||||||
bot.telegram.getMe().then((botInfo) => {
|
bot.telegram.getMe().then((botInfo) => {
|
||||||
bot.options.username = botInfo.username;
|
bot.options.username = botInfo.username;
|
||||||
bot.context.botInfo = botInfo;
|
bot.context.botInfo = botInfo;
|
||||||
|
}).then(() => {
|
||||||
|
bot.startPolling();
|
||||||
});
|
});
|
||||||
|
|
||||||
bot.use(
|
bot.use(
|
||||||
@@ -25,5 +27,3 @@ bot.use(
|
|||||||
|
|
||||||
|
|
||||||
bot.catch(logError);
|
bot.catch(logError);
|
||||||
|
|
||||||
bot.startPolling();
|
|
||||||
|
Reference in New Issue
Block a user