Exemplo n.º 1
0
        private CustomKeyboard GetKeyboard(Func <string, string> callback, TimeSpan expiration)
        {
            var kb = new CustomKeyboard(true, true, expiration);

            kb.Callback = callback;
            _keyboardResponses.Add(kb.ID, kb);
            return(kb);
        }
Exemplo n.º 2
0
        private void SendCustomKeyboard(string message, CustomKeyboard kb)
        {
            var values = new Dictionary <string, string>
            {
                { "reply_markup", kb.ToString() }
            };

            message = string.Format("{0} - {1}", kb.ID, message);
            _sendMessage(message, values);
        }