[Solved] setGameScore & getGameHighScores has error if game starts from bot
See original GitHub issueIf a user starts a game from bot, when i want call getGameHighScores i should pass userId
& chatId
& messageId
, but the error is:
Error: 400: Bad Request: chat not found
same as getGameHighScores the setGameScore pass the error:
Error: 400: Bad Request: wrong inline message identifier specified
there is no problem if I use inlineMessageId
instead of chatId
& messageId
, but there is no inlineMessageId
when game starts from bot.
what should I do? where is the problem?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to set game score using setGameScore in python ...
Used : bot.setGameScore (user_id = 5432131, score=76,inline_message_id=uygrtfghfxGKJB). I received these two(user_id,inline_message_id) ...
Read more >setGameScore - aiogram 3.0.0b7 documentation
Returns an error, if the new score is not greater than the user's current score in the chat and force is False ....
Read more >tgbotapi - Go Packages
Package tgbotapi has functions and types used for interacting with the Telegram Bot ... error); func (bot *BotAPI) GetGameHighScores(config ...
Read more >Telegram Bot API
The Bot API is an HTTP-based interface created for developers keen on building ... In case of an unsuccessful request, 'ok' equals false...
Read more >telebot-plugins - npm Package Health Analysis - Snyk
on(['/start', '/hello'], (msg) => msg.reply.text('Welcome!')); When sticker received, reply back: bot.on('sticker ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I found the answer: if a user starts game from a group chat, you should pass just inline_message_id but if a user starts game from a bot, you should pass 3 items, id, chat_id and user_id you should ask which id? the answer is here, when a user starts the game, you cand get these 3 parameters from the gameQuery
so if you want get the high score:
and if you want set score:
Yes, that works with
'undefined'
too!!! 😐