1
1
1Aspect12021-05-02 23:14:16
Python
1Aspect1, 2021-05-02 23:14:16

How to make telegram bot style text game in python language?

It is necessary that, for example, 3 commands are displayed to start the game, help and a leaderboard.
Is it possible to make it so that when you choose to start the game, the bot displays some piece of text and again highlights the choice in the plot?
Throw off some material that will help me do this, on the Internet so-so information

Answer the question

In order to leave comments, you need to log in

4 answer(s)
Y
Yupiter7575, 2021-05-02
@yupiter7575

Is it possible to make it so that when you choose to start the game, the bot displays some piece of text and again highlights the choice in the plot?

-Can
I recommend Mark Lutz's book Learning Python :)

V
Vindicar, 2021-05-03
@Vindicar

Learn what finite state machines are and how to implement them. In fact, it will give you the necessary base for the implementation of the game. Each story step will be a state, and the player's actions will be transitions.
There are several ways to implement them, think carefully which one is more convenient. For example, a variant with a transition matrix will not work well.

D
Developer, 2021-05-03
@samodum

Yes, you can.
For this, Python has input and print.
Any book on python

S
skilet16, 2021-05-03
@skilet16

Read tutorials on working with telegram api:
https://mastergroosha.github.io/telegram-tutorial/...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question