Esempio n. 1
0
        public override async Task handleAsync(IIncomingMessage message, IVityaBot bot, Match match)
        {
            var peerId = match.Groups[1].Value;
            var memeId = match.Groups[2].Value;
            var text   = match.Groups[3].Value;

            if (text == "random")
            {
                await bot.processRandomBestMemeAsync(new Models.UpdateMessage()
                {
                    @object = new Models.UpdateMessageData()
                    {
                        peer_id = int.Parse(peerId)
                    }
                });
            }
            else
            {
                await bot.processMemeByIdAsync(peerId, memeId, text);
            }
        }
Esempio n. 2
0
 public override async Task handleAsync(IIncomingMessage message, IVityaBot bot, Match match)
 {
     await bot.processRandomBestMemeAsync(message);
 }