feliperenan / truco

Truco paulista implemented in Elixir :)
4 stars 0 forks source link

Add possibility for users to play this game on multiple groups #7

Open feliperenan opened 3 years ago

feliperenan commented 3 years ago

Currently it is not possible to play this game on multiple group simultaneously because I could not figure out a good way of doing so with inline queries yet.

The main issue is that we can't get the chat_id when a inline query is sent by the User so we can't say which games the user belongs to. For now, since I added this limitation on telegram bot that one user will be in just one game, from its ID I'm able to find which game he is associated to.

Keep in mind this is a Telegram bot limitation, in other words, the game engine is ready for this feature, I just need to figure out how to do so on telegram chat with inline queries.

https://core.telegram.org/bots/api#inline-mode

feliperenan commented 3 years ago

We can try to use this bot as inspiration: https://github.com/jh0ker/mau_mau_bot