Ejemplo n.º 1
0
        public void CreateOwnPassword(TelegramBotClient bot, CallbackQuery callback, Model.User user)
        {
            var setName = new SetValue(bot);

            setName.InputNew(callback.Message, "sites name");
            var name    = setName.GetValue();
            var setPass = new SetValue(bot);

            setPass.InputNew(callback.Message, "password");
            var password = setPass.GetValue();
            var setUrl   = new SetValue(bot);

            setUrl.InputNew(callback.Message, "url");
            var url = setUrl.GetValue();

            Sites.Add(new Site(name, user, password, url));
            Save();

            bot.SendTextMessageAsync(callback.Message.Chat.Id, $"сайт {name} был сохранён");
        }