-
Notifications
You must be signed in to change notification settings - Fork 0
OnSticker handler
Arius Bronte edited this page Feb 25, 2020
·
1 revision
Triggers on a sticker with ID 163 and responds with the word "orejas".
commands.OnSticker(163, "orejas");Triggers on a sticker with ID 163 and sends randomly from the array word.
commands.OnSticker(163, new[] {"orejas", "sticker", "triggered"});*applies to all triggers.
Triggered on all incoming messages or if no command is found. Is not required.
commands.OnSticker("sticker triggered");
// or
commands.OnSticker(new[] {"it`s sticker!", "sticker triggered"});You can configure the logic for a specific conversation.
commands.OnSticker((2_000_000_000 + 1, 163), "orejas");
commands.OnSticker((2_000_000_000 + 2, 163), "rightfully");
commands.OnSticker((2_000_000_000 + 3, 63), "ha-ha like!");You can set your own trigger processing logic.
commands.OnSticker(163, async (api, message, token) =>
{
await api.Messages.SendStickerAsync(new MessagesSendStickerParams
{
PeerId = message.PeerId.Value,
StickerId = 163U,
RandomId = random.Next(int.MinValue, int.MaxValue)
});
});*applies to all triggers.