Comments (13)
Could you show what package options you are using so I can simulate the situation?
from telegram-inline-calendar.
from telegram-inline-calendar.
here's the code
Always on the same press? Many factors can play here: CPU load, Internet speed, problems on the telegram side, my badly optimized code :)
from telegram-inline-calendar.
Try like this:
bot.on("callback_query", (ctx) => {
if (ctx.callbackQuery.message.message_id == calendar.chats.get(ctx.callbackQuery.message.chat.id)) {
res = calendar.clickButtonCalendar(ctx.callbackQuery);
if (res !== -1) {
ctx.reply("You selected: " + res);
}
}
});
from telegram-inline-calendar.
would a video of the behaviour help?
WhatsApp.Video.2023-03-03.at.3.41.11.PM.mp4
this is with the code you passed.
from telegram-inline-calendar.
would a video of the behaviour help?
WhatsApp.Video.2023-03-03.at.3.41.11.PM.mp4
this is with the code you passed.
Can you try using a different Telegram Bot Api? I want to understand if the problem will repeat with another API, because I can not reproduce the problem.
from telegram-inline-calendar.
The problem is most likely related to slow internet or api.telegram response.
from telegram-inline-calendar.
I can't speak for the telegram api, but my internet isn´t as slow as to cause this kind of issues. But I don't know
from telegram-inline-calendar.
Could you try using node-telegram-bot-api
or grammy
for testing? This is required to understand if the problem occurs when using other libraries. If the problem does not manifest itself, I will make changes to the package.
from telegram-inline-calendar.
Ill try today and see what happens. Ill report back then
from telegram-inline-calendar.
@AguChaves92, Are you using type: "module"
? If yes, then at the moment the library does not support ESM
, in the near future I will release an update to work with ESM
.
from telegram-inline-calendar.
@AguChaves92, can you try using the following version: npm i telegram-inline-calendar@ecmascript
?
from telegram-inline-calendar.
@AguChaves92, If you managed to make everything work, please consider closing this issue.
from telegram-inline-calendar.
Related Issues (11)
- 'Bad Request' Error HOT 4
- Could not find a declaration file for module HOT 18
- Is it possible to not display a specific date and time? HOT 9
- I can't switch months 😞 HOT 6
- Could not find a declaration file for module '../utilites/calendar/Calendar.js'. HOT 6
- Changing days order HOT 1
- Change message HOT 13
- TypeError: NavCalendar is not a constructor HOT 3
- Could not find a declaration file for module 'telegram-inline-calendar'. HOT 16
- Get the wrong time when calling clickButtonCalendar HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from telegram-inline-calendar.