Skip to content

Commit bc73f34

Browse files
mrgigabyteeternnoir
authored andcommitted
Update README.md
1 parent a824ff9 commit bc73f34

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,20 @@ def query_text(inline_query):
386386
print(e)
387387

388388
```
389+
###Working with entities:
390+
This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.
391+
Attributes:
392+
* `type`
393+
* `url`
394+
* `offset`
395+
* `length`
396+
397+
398+
**Here's an Example:**`message.entities[num].<attribute>`<br>
399+
Here `num` is the entity number or order of entity in a reply, for if incase there are multiple entities in the reply/message.<br>
400+
`message.entities` returns a list of entities object. <br>
401+
`message.entities[0].type` would give the type of the first entity<br>
402+
Refer [Bot Api](https://core.telegram.org/bots/api#messageentity) for extra details
389403

390404
## Advanced use of the API
391405

0 commit comments

Comments
 (0)