Giter Site home page Giter Site logo

Comments (7)

cotestatnt avatar cotestatnt commented on August 16, 2024 1

I'm not sure I've understood what you want to do in your application.
However the id of the user who sends the message (in reality it is the id of the chat, but it is equivalent), you can get for example in this way:
uint32_t userid = msg.sender.id

Or if you need to know it before compiling by sending a message to the bot https://t.me/JsonDumpBot

Unfortunately there is no way to figure it out from the username like @my_username (or at least I'm not aware of it)

from asynctelegram.

gnalbandian avatar gnalbandian commented on August 16, 2024 1

Hi @cotestatnt , @spyfox147.

@spyfox147 I get what you need. In fact I've done it in my fork of the repo (not online) which unfortunately, has grown very much apart from this one in which it is based upon.
Maybe if you are interested I could take some time to make it available online.
I have get rid of all String variables.
It has some new features and protection mechanisms.
I believe it's a little bit faster and light but haven't prove it.

PD: It's only for esp8266 because I haven't got an esp32 and that makes it hard to debug.

from asynctelegram.

spyfox147 avatar spyfox147 commented on August 16, 2024

thank you, what i was trying to do is to store a list of IDs in eeprom for the authentication of who can get response from my bot.
i also was wondering if the library has timeout for checking NTP server, if there's no internet connection it will keep checking forever

from asynctelegram.

spyfox147 avatar spyfox147 commented on August 16, 2024

@gnalbandian i started working adding support for timeout and auto reconnect the NTP server because when there's no internet connection it will keep delaying forever waiting NTP, so when it timeout the esp will continue working and will check NTP server later. i wonder if your fork support that

from asynctelegram.

cotestatnt avatar cotestatnt commented on August 16, 2024

i also was wondering if the library has timeout for checking NTP server, if there's no internet connection it will keep checking forever
@spyfox147 you should sync clock with NTP server only when internet connection is active.
Anyway, it's quite simple add a timeout checking (check commit)

if (WiFi.connected())){
   myBot.setClock("CET-1CEST,M3.5.0,M10.5.0/3", 10000);
}

I haven't developed so much functionality around system clock because is strictly platfrom dependent, and i'm going to a different path with AsyncTelegram2 (platform and transport independency).

from asynctelegram.

gnalbandian avatar gnalbandian commented on August 16, 2024

I have left all ntp-related stuff out of the library as I believe that it doesn't belong inside it. Just a philosophy matter.
I deal with it outside the library.

from asynctelegram.

cotestatnt avatar cotestatnt commented on August 16, 2024

I believe that it doesn't belong inside it

I agree. This is why I changed my mind and removed the feature in the new version.

from asynctelegram.

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.