mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2026-04-19 21:33:54 +00:00
implicit InputStickerSet from string shortName
This commit is contained in:
parent
3f84e10f7f
commit
b1c8d225f2
3 changed files with 9 additions and 4 deletions
|
|
@ -73,13 +73,13 @@ foreach (var stickerSet in allStickers.sets)
|
|||
// • Send a random sticker from the user's favorites stickers
|
||||
var favedStickers = await client.Messages_GetFavedStickers();
|
||||
var stickerDoc = favedStickers.stickers[new Random().Next(favedStickers.stickers.Length)];
|
||||
await client.SendMessageAsync(InputPeer.Self, null, new InputMediaDocument { id = stickerDoc });
|
||||
await client.SendMessageAsync(InputPeer.Self, null, stickerDoc);
|
||||
|
||||
// • Send a specific sticker given the stickerset shortname and emoticon
|
||||
var friendlyPanda = await client.Messages_GetStickerSet(new InputStickerSetShortName { short_name = "Friendly_Panda" });
|
||||
var friendlyPanda = await client.Messages_GetStickerSet("Friendly_Panda");
|
||||
var laughId = friendlyPanda.packs.First(p => p.emoticon == "😂").documents[0];
|
||||
var laughDoc = friendlyPanda.documents.First(d => d.ID == laughId);
|
||||
await client.SendMessageAsync(InputPeer.Self, null, new InputMediaDocument { id = laughDoc });
|
||||
await client.SendMessageAsync(InputPeer.Self, null, laughDoc);
|
||||
|
||||
// • Send a GIF from an internet URL
|
||||
await client.SendMessageAsync(InputPeer.Self, null, new InputMediaDocumentExternal
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue