From f036e2a871375e2d587597042a2d345ce7ee0634 Mon Sep 17 00:00:00 2001 From: Lonami Date: Mon, 25 Jun 2018 09:32:45 +0200 Subject: [PATCH] Destroyed Sending stickers (markdown) --- Sending-stickers.md | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 Sending-stickers.md diff --git a/Sending-stickers.md b/Sending-stickers.md deleted file mode 100644 index b4fa76e..0000000 --- a/Sending-stickers.md +++ /dev/null @@ -1,28 +0,0 @@ -Stickers are nothing else than **files**, and when you successfully retrieve the stickers for a certain sticker set, all you will have are **handles** to these files. Remember, the files Telegram holds on their servers can be referenced through this pair of ID/hash (unique per user), and you need to use this handle when sending a "document" message. This working example will send yourself the very first sticker you have: - -```python -# Get all the sticker sets this user has -sticker_sets = client(GetAllStickersRequest(0)) - -# Choose a sticker set -sticker_set = sticker_sets.sets[0] - -# Get the stickers for this sticker set -stickers = client(GetStickerSetRequest( - stickerset=InputStickerSetID( - id=sticker_set.id, access_hash=sticker_set.access_hash - ) -)) - -# Stickers are nothing more than files, so send that -client(SendMediaRequest( - peer=client.get_me(), - media=InputMediaDocument( - id=InputDocument( - id=stickers.documents[0].id, - access_hash=stickers.documents[0].access_hash - ), - caption='' - ) -)) -``` \ No newline at end of file