@@ -46,6 +46,12 @@ bot = GreenAPIBot(
4646)
4747```
4848
49+ ### How to set up an instance
50+
51+ To start receiving incoming notifications, you need to set up an instance. Open the personal cabinet page at
52+ the [ link] ( https://console.green-api.com/ ) . Select an instance from the list and click on it. Click ** Change** . In the *
53+ * Notifications** category, enable all notifications that you want to receive.
54+
4955### How to start receiving and answering messages
5056
5157To start receiving messages, you must create a handler function with one parameter (` notification ` ). The ` notification `
@@ -60,6 +66,8 @@ brackets.
6066
6167To start the bot, call the ` bot.run_forever ` function. You can stop the bot with the key combination Ctrl + C.
6268
69+ In this example, the bot will only answer the ` message ` message.
70+
6371Link to example: [ base.py] ( https://github.com/green-api/whatsapp-chatbot-python/blob/master/examples/base.py ) .
6472
6573```
@@ -82,6 +90,8 @@ You can receive not only incoming messages but also outgoing messages. You can a
8290The body of the notification is in ` notification.event ` . In this example, we get the message type from the notification
8391body.
8492
93+ In this example, the bot receives all incoming messages.
94+
8595Link to example: [ event.py] ( https://github.com/green-api/whatsapp-chatbot-python/blob/master/examples/event.py ) .
8696
8797```
@@ -163,6 +173,8 @@ command = ("help", "!/")
163173
164174#### Example
165175
176+ In this example, the bot will send a photo in response to the ` rates ` command.
177+
166178Link to example: [ filters.py] ( https://github.com/green-api/whatsapp-chatbot-python/blob/master/examples/filters.py ) .
167179
168180```
@@ -316,6 +328,8 @@ To send a text message, you have to use the `notification.answer` method.
316328To send a location, you have to use the ` sending.sendLocation ` method from ` notification.api ` .
317329To send a message with a file, you have to use the ` notification.answer_with_file ` method.
318330
331+ In this example, the bot only responds to commands from the list above.
332+
319333Link to example: [ full.py] ( https://github.com/green-api/whatsapp-chatbot-python/blob/master/examples/full.py ) .
320334
321335``` python
0 commit comments