GithubHelp home page GithubHelp logo

does bot.Start work? about telebot HOT 8 CLOSED

tucnak avatar tucnak commented on August 16, 2024
does bot.Start work?

from telebot.

Comments (8)

tucnak avatar tucnak commented on August 16, 2024

Do you care to elaborate? Bot.Start() does work for me.

from telebot.

mpirbay avatar mpirbay commented on August 16, 2024

Sorry for coming back late.
First of all the inline example crashes as it is because of the sequence:
go messages(bot) go queries(bot) bot.Start(1 * time.Second)

I had to put the line bot.Start(1 * time.Second) before the call to messages and queries.

Then, after that change, simply nothing happens.
I tried the code on a mac and on a win7 machine. same behaviour in both cases.

I also tried to use bot.Start () in other programs but it has always the same behaviour: it simply never returns anything

from telebot.

tucnak avatar tucnak commented on August 16, 2024

Alright, let's see what's going on. First of all, can you provide your full code please? I just tried the inline example in the initial order and it works just fine here.

Can you please provide the stack trace of the crash you're talking about?

from telebot.

mpirbay avatar mpirbay commented on August 16, 2024

The code I am using is the exact copy of the inline example with a valid token.
When I run it from command line, nothing happens as if the program were hanging

from telebot.

tucnak avatar tucnak commented on August 16, 2024

First of all the inline example crashes as it is because of the sequence:

Can you provide a stack trace please?

from telebot.

mpirbay avatar mpirbay commented on August 16, 2024

I am sincerely embarrassed, but I cannot reproduce the crash. I have the same behaviour whether I put the line bot.Start(1 * time.Second) before or after the call to messages(bot).
I apologize for the confusion.
However, as stated previously, when I execute the inline example, I have no response. Can you please tell me what I should expect?

from telebot.

tucnak avatar tucnak commented on August 16, 2024

Well, you definitely shouldn't do bot.Start in the last place. It blocks on polling internally. Can you please add some debug prints and see whether it gets stuck on bot.Start precisely. If it is bot.Start indeed, as it seems to me, you might be running in some networking issues or whatever.

And please make sure the bot you testing is the one you put in BOT_TOKEN.

from telebot.

tucnak avatar tucnak commented on August 16, 2024

Closing for the time being.

from telebot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.