Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: [polling_error] #1241

Open
Datou-Pikaqiu opened this issue Dec 2, 2024 · 1 comment
Open

error: [polling_error] #1241

Datou-Pikaqiu opened this issue Dec 2, 2024 · 1 comment

Comments

@Datou-Pikaqiu
Copy link

Please help me!, error below happen when running the bot for the first time! :
error: [polling_error] {"code":"EFATAL","message":"EFATAL: AggregateError"}

Here is my code:

const TelegramBot = require('node-telegram-bot-api');

const token = '8067368517:AAE4hmj4buXNUitqdsBViJMt7RGB660QM08';

const bot = new TelegramBot(token, {polling: true});

bot.on('message', (msg) => {

    var Hi = "hi";
    if (msg.text.toString().toLowerCase().indexOf(Hi) === 0) {
    bot.sendMessage(msg.chat.id,"Hello dear user");
    }
    
    });

I am using the Windows 10 operating system and VPN, why does this situation still occur

@1devNdogs
Copy link

This solve the problem for me, theres also a stackoverflow link with more details
#1193

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants