telegram-bot-sdk icon indicating copy to clipboard operation
telegram-bot-sdk copied to clipboard

REQUEST: Nested Entities

Open jonnywilliamson opened this issue 5 years ago • 2 comments

Would anyone have an example of how a nested entity looks when an update object is received?

At the moment I can only find example of multi entities per update, not NESTED entities. To add the feature to the latest API 4.5, I would like to have a proper sample to test code against. Then I can add it to https://github.com/irazasyed/telegram-bot-sdk/pull/699

At the moment, multiple entities per update look something like this:

{
	"update_id": 79107515,
	"message": {
		"message_id": 9906,
		"from": {
			"id": 99999999,
			"is_bot": false,
			"first_name": "Jonathan",
			"last_name": "Williamson",
			"username": "",
			"language_code": "en"
		},
		"chat": {
			"id": 99999999,
			"first_name": "Jonathan",
			"last_name": "Williamson",
			"username": "",
			"type": "private"
		},
		"date": 1578044613,
		"text": "These are multiple entities https://github.com",
		"entities": [
			{
				"offset": 0,
				"length": 5,
				"type": "italic"
			},
			{
				"offset": 10,
				"length": 8,
				"type": "bold"
			},
			{
				"offset": 28,
				"length": 18,
				"type": "url"
			}
		]
	}
}

Anyone have anything similar for the nested option?

Thank you

jonnywilliamson avatar Jan 03 '20 09:01 jonnywilliamson

Bump!!

jonnywilliamson avatar Apr 19 '20 09:04 jonnywilliamson

+1

MrFiregore avatar May 18 '22 06:05 MrFiregore