Skip to content

Commit

Permalink
fix incorrect telegram id parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
belotserkovtsev committed Jul 24, 2021
1 parent ca0a741 commit 44619c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const spendingsService = new SpendingsService()
const bot = new Telegraf(process.env.TOKEN)

bot.on('message',(ctx, next) =>{
if (ctx.message.chat.id === process.env.TELEGRAM_ID) {
if (ctx.message.chat.id === parseInt(process.env.TELEGRAM_ID)) {
next()
} else {
ctx.reply('Ты не можешь пользоваться этим ботом')
Expand Down

0 comments on commit 44619c6

Please sign in to comment.